我有一个带有php 5.4.12的WAMP,我想报告错误。
我的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但是没有显示错误。
error_reporting应该取什么值,如何检索报告的错误?
发布于 2015-04-14 20:01:30
我猜你的php.ini里的display_errors已经关闭了。尝试执行以下操作(在您正在处理的php文件中)。
ini_set('display_errors' , 'On');
error_reporting(E_ALL);要将标志从php.ini设置为on,请找到display_errors所在的位置,并将值更改为On。如果这不起作用,请发布完整的php.ini。
发布于 2015-04-14 16:54:27
你能检查在你试图运行的php脚本(它会覆盖php标志)和.htaccess文件中是否有错误报告标志吗?这是覆盖php .ini标志的两个选项。
https://stackoverflow.com/questions/29622816
复制相似问题