• <bdo id='nBVpJ'></bdo><ul id='nBVpJ'></ul>

    <small id='nBVpJ'></small><noframes id='nBVpJ'>

    <legend id='nBVpJ'><style id='nBVpJ'><dir id='nBVpJ'><q id='nBVpJ'></q></dir></style></legend>
      <tfoot id='nBVpJ'></tfoot>
      <i id='nBVpJ'><tr id='nBVpJ'><dt id='nBVpJ'><q id='nBVpJ'><span id='nBVpJ'><b id='nBVpJ'><form id='nBVpJ'><ins id='nBVpJ'></ins><ul id='nBVpJ'></ul><sub id='nBVpJ'></sub></form><legend id='nBVpJ'></legend><bdo id='nBVpJ'><pre id='nBVpJ'><center id='nBVpJ'></center></pre></bdo></b><th id='nBVpJ'></th></span></q></dt></tr></i><div id='nBVpJ'><tfoot id='nBVpJ'></tfoot><dl id='nBVpJ'><fieldset id='nBVpJ'></fieldset></dl></div>
      1. phpinfo() 在我的 CentOS 服务器上不起作用

        phpinfo() is not working on my CentOS server(phpinfo() 在我的 CentOS 服务器上不起作用)
          <bdo id='unnZn'></bdo><ul id='unnZn'></ul>
          1. <legend id='unnZn'><style id='unnZn'><dir id='unnZn'><q id='unnZn'></q></dir></style></legend>
            <tfoot id='unnZn'></tfoot>
            <i id='unnZn'><tr id='unnZn'><dt id='unnZn'><q id='unnZn'><span id='unnZn'><b id='unnZn'><form id='unnZn'><ins id='unnZn'></ins><ul id='unnZn'></ul><sub id='unnZn'></sub></form><legend id='unnZn'></legend><bdo id='unnZn'><pre id='unnZn'><center id='unnZn'></center></pre></bdo></b><th id='unnZn'></th></span></q></dt></tr></i><div id='unnZn'><tfoot id='unnZn'></tfoot><dl id='unnZn'><fieldset id='unnZn'></fieldset></dl></div>

                <tbody id='unnZn'></tbody>

              • <small id='unnZn'></small><noframes id='unnZn'>

                • 本文介绍了phpinfo() 在我的 CentOS 服务器上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在我的 CentOS 服务器上安装了 PHP.但是,当在我的脚本中运行 phpinfo() 来测试它时,我收到的是 HTML,而不是解释的信息.

                  I have PHP installed on my CentOS server. However, when running a phpinfo() inside my script to test it, I receive the HTML, not the interpreted information.

                  我可以看到 PHP 的文件夹.我什至可以在 etc 文件夹中看到 php.ini.但是 PHP 本身似乎不起作用.

                  I can see the folders for PHP. I can even see the php.ini in the etc folder. But PHP itself does not seem to be working.

                  我的意思是我的 test.php 文件看起来像这样:

                  I mean my test.php file looks like this:

                  <?php
                      phpinfo();
                  ?>
                  

                  响应如下所示:

                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
                  <html><head>
                  <style type="text/css">
                  body {background-color: #ffffff; color: #000000;}
                  body, td, th, h1, h2 {font-family: sans-serif;}
                  pre {margin: 0px; font-family: monospace;}
                  a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
                  ...
                  

                  等等.

                  问题似乎是什么,我该如何解决?

                  What seems to be the problem and how do I solve it?

                  如果我复制返回的 HTML,将其粘贴到 HTML 文件中,然后从那里运行它,我可以看到格式化的结果,但不能通过运行 test.php.我假设 PHP 没有以某种方式加载......即使在解释的 HTML 中我可以看到:

                  If I copy the HTML returned, paste it into an HTML file, and run it from there, I can see the formatted result, but not by running the test.php. I assume PHP is not loaded somehow... even if in the interpreted HTML I can see the:

                  **Server API    Apache 2.0 Handler
                  Virtual Directory Support    disabled
                  Configuration File (php.ini) Path    /etc/php.ini
                  Scan this dir for additional .ini files    /etc/php.d
                  additional .ini files parsed    /etc/php.d/dbase.ini, /etc/php.d/json.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini
                  PHP API    20041225
                  PHP Extension    20050922
                  Zend Extension    220051025
                  Debug Build    no
                  Thread Safety    disabled
                  Zend Memory Manager    enabled
                  IPv6 Support    enabled
                  Registered PHP Streams    php, file, http, ftp, compress.bzip2, compress.zlib, https, ftps**
                  

                  等等……

                  在这个系统上,托管了三个网站.和这个问题有关系吗?

                  On this system, there are three websites hosted. Does that have anything to do with this problem?

                  推荐答案

                  这也发生在我身上.修复将其包装在 HTML 标记中.然后我将文件保存为 /var/www/html/info.php 并运行 http://localhost/info.php 在浏览器中.就是这样.

                  This happened to me as well. The fix was wrapping it in HTML tags. Then I saved the file as /var/www/html/info.php and ran http://localhost/info.php in the browser. That's it.

                  <html>
                      <body>
                          <?php
                              phpinfo();
                          ?>
                      </body>
                  </html>
                  

                  这篇关于phpinfo() 在我的 CentOS 服务器上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                  datetime to timestamp(日期时间到时间戳)
                  PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                  Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                  Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                  Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)
                  <tfoot id='pyz0y'></tfoot>
                    <bdo id='pyz0y'></bdo><ul id='pyz0y'></ul>

                        <small id='pyz0y'></small><noframes id='pyz0y'>

                              <tbody id='pyz0y'></tbody>
                            <legend id='pyz0y'><style id='pyz0y'><dir id='pyz0y'><q id='pyz0y'></q></dir></style></legend>
                            <i id='pyz0y'><tr id='pyz0y'><dt id='pyz0y'><q id='pyz0y'><span id='pyz0y'><b id='pyz0y'><form id='pyz0y'><ins id='pyz0y'></ins><ul id='pyz0y'></ul><sub id='pyz0y'></sub></form><legend id='pyz0y'></legend><bdo id='pyz0y'><pre id='pyz0y'><center id='pyz0y'></center></pre></bdo></b><th id='pyz0y'></th></span></q></dt></tr></i><div id='pyz0y'><tfoot id='pyz0y'></tfoot><dl id='pyz0y'><fieldset id='pyz0y'></fieldset></dl></div>