脚本宝典收集整理的这篇文章主要介绍了php – 为什么codeigniter没有记录错误!,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我的index.PHP有
使用error_reporting(E_ALL);
如果页面无法加载,如果发生了什么,甚至GET记录错误?如果它不是我有大量的代码,我将不得不搜索语法错误,任何关于如何使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'] = ''; `
error_reporting(E_ALL);
所以你的脚本永远不会知道输出错误.编辑您的PHP.ini文件以确保您拥有:
error_reporting = E_ALL error_log = "/path/to/some/apache/writable/file"
以上是脚本宝典为你收集整理的php – 为什么codeigniter没有记录错误!全部内容,希望文章能够帮你解决php – 为什么codeigniter没有记录错误!所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。