先给出官方的E文定义:
display_errors
stringThis determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user. Value "stderr" sends the errors to stderr instead of stdout. The value is available as of PHP 5.2.4. In earlier versions, this directive was of type boolean.
Note: This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet).
Note: Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed.
基本的翻译“”
第一句话讲的确实已经很清楚“这个设置决定了是否在屏幕上显示当前的错误信息”,但我在处理一个异常信息时,我已经对当前的异常信息加上了
try { //some throw new HXxxException(); } catch(HXxxxException $ex) { var_dump($ex->getMessage()); }
- 但是异常的报错信息还是被打印在了屏幕上。我一开始还以为是 xdebug
- 的原因,我把 xdebug
- 的扩展给去了,可它还是一样的输出。最后,我通过查配置,发现了:
display_errors=On;
display = On
评论(2)
Kert To 九九 (2017-06-14)