【发布时间】:2011-02-11 14:43:53
【问题描述】:
我最近迁移到 PHP 5.3.2,并意识到我现在无法关闭我网站中的通知错误。我去了php.ini,在这些行中:
; Common Values:
; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.)
; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices)
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_NOTICE
...我已尝试设置所有内容(并且每次都重新启动 apache),但我无法摆脱通知。
我能够摆脱通知错误的唯一方法是设置:
display_errors = Off
当然,这不是我能做的事情,因为我需要查看错误来修复它们,而且我希望在我正在编码的网页上查看错误,而不是将它们记录在某个地方。
有人可以帮忙吗?这是 PHP 5.3.2 中的错误还是我做错了什么?
非常感谢您的宝贵时间!
P。 S. 另外,有人知道我怎样才能让 PHP 5.3.2 支持 .php3 扩展吗?
【问题讨论】:
标签: php error-handling