我如何隔离不想要的PHP错误信息? [英] How do I isolate unwanted PHP error messages?
问题描述
我使用WAMP,并需要知道为什么我收到服务器错误消息出现在所有的浏览器。 (见抢)。我已经在php.ini开启错误显示关闭,不能看到这会显示这些httpd.conf文件的任何地方。我想AP preciate一些帮助,我怎么能解决这个问题。如果有人需要进一步的code或信息,我会很乐意在小提琴供应。
I am using wamp and need to know why I am getting server error messages appear in all browsers. (see grab). I have turned error display off in php.ini and cannot see anywhere in the httpd.conf file that would be displaying these. I would appreciate some help as to how I can troubleshoot this problem. If anyone requires further code or information, I would be happy to supply at fiddle.
我使用php5.3.5和Apache 2.0.53。
I am using php5.3.5 and apache 2.0.53.
感谢
推荐答案
的display_errors
多变 PHP_INI_ALL
(<一个HREF =http://php.net/manual/en/errorfunc.configuration.php相对=nofollow>文档)。
这意味着它可以在的.htaccess
使用来启用或正在运行的脚本的ini_set()
。检查你的.htaccess文件;请注意,服务器(在默认配置)检查父目录的.htaccess文件,以及 - 所以,如果你的网站是在 /var/www/example.com/htdocs
,检查为的.htaccess
中的每个在这个路径中的目录中。
This means it can be enabled in .htaccess
, or in a running script using ini_set()
. Check your .htaccess files; note that the server (in default config) checks .htaccess files in parent directories as well - so if your site is in /var/www/example.com/htdocs
, check for .htaccess
in each of the directories in this path.
这篇关于我如何隔离不想要的PHP错误信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!