How to change the way PHP writes errors in the error log file?

霸气de小男生 提交于 2019-12-05 16:23:35

You can't do any additional customization or implement any of that logic with the built-in error handler, you'd need to set your own error handler with set_error_handler().

This function takes a callback which will be invoked when PHP encounters an error, and you can act accordingly.

See the example on the docs for how to use this function and how to implement a proper callback.

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