Does PHP error_reporting(0) affect error logging, or just display?

你离开我真会死。 提交于 2019-11-30 12:45:46

Yes, it affects both.

The error_reporting level defines what levels of errors gets triggered. Whether you log or display those errors are determined by the other settings.

To summarize:

In essence, setting error_reporting(0) means that you've turned off error reporting, and nothing will be logged to file or output to the screen.

It just suppresses displayed errors. Your ini settings for error logging determine logging levels.

PHP has pretty good docs, check out

http://us.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting for what it does,

http://us.php.net/manual/en/function.error-reporting.php for the runtime function

Its effects depend on where stderr is going.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!