由于某种原因,我无法让错误日志记录正常工作,我遇到了死机白屏,我希望错误日志能够阐明这种情况!
我的index.php有
错误报告(E_ALL);
我还确保 system/logs 目录具有适当的权限,
如果页面无法加载(就像发生的情况一样),甚至会记录错误吗?如果没有的话,我有大量的代码,我必须搜索语法错误,任何关于如何使 php 错误吐出的建议都会有所帮助!
另外,这是我的配置
`
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| If you have enabled error logging, you can set an error threshold to
| determine what gets logged. Threshold options are:
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 1;
/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| system/logs/ folder. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';
`
我的系统/日志中只有一个index.html,其中有一个403错误。
如果页面由于解析错误而无法加载,那么它将永远不会执行
error_reporting(E_ALL);
所以你的脚本永远不会知道输出错误。编辑 php.ini 文件以确保:
error_reporting = E_ALL
error_log = "/path/to/some/apache/writable/file"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)