无法使 PHP 错误报告正常工作
我检查了 php.ini 并且
log_errors = On
error_log = "c:/wamp/logs/php_error.log" `
(目录包含 access.log、apache_error.log、log.dir、mysql.log)
没有“error_reporting”条目,但有一条注释(我不太明白)
; Eval the expression with current error_reporting(). Set to true if you want
; error_reporting(0) around the eval().
; http://php.net/assert.quiet-eval
;assert.quiet_eval = 0
我会如果有人能帮助我,我会很感激。
I have checked php.ini and
log_errors = On
error_log = "c:/wamp/logs/php_error.log" `
(the dir contain access.log, apache_error.log, log.dir, mysql.log)
there is no entry for "error_reporting" but there is a comment (which I did not quite understand)
; Eval the expression with current error_reporting(). Set to true if you want
; error_reporting(0) around the eval().
; http://php.net/assert.quiet-eval
;assert.quiet_eval = 0
I would appreciate it if someone could help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需在运行时设置即可:
Just set it at runtime:
另一个脚本设置了 error_reporting(0) 吗?
您的错误日志文件可写吗?
在你的 php.ini 中(或者正如其他发帖者在你的脚本中所说的那样)设置 error_reporting = E_ALL
你是否生成错误?
Is another script setting error_reporting(0)?
Is your error log file writable?
In your php.ini (or as the other poster said in your script) set error_reporting = E_ALL
Are you generating errors?
以下内容位于我的 php.ini 文件中:
您应该能够将
error_reporting =
行以及适当的值添加到您的 php.ini 文件中,然后就可以开始了。The following is in my php.ini file:
You should just be able to add the
error_reporting =
line to your php.ini file along with an appropriate value and be good to go.