php method to turn off error reporting: first open the php.ini configuration file; then search for display_errors in the file; finally change [display_errors = Off] to [display_errors = On].
The operating environment of this article: windows10 system, php 7.3, thinkpad t480 computer.
The specific method is as follows:
First find the php configuration file, which is php.ini;
Then search for 'display_errors' in the file and find display_errors = Off or display_errors = On, Off means turning off error prompts, On means turning on error prompts, you can modify it according to your needs.
You can also add the following code to the php file
//禁用错误报告 error_reporting(0); //报告运行时错误 error_reporting(E_ERROR | E_WARNING | E_PARSE); //报告所有错误 error_reporting(E_ALL);
Related recommendations:php tutorial
The above is the detailed content of How to turn off error reporting in php. For more information, please follow other related articles on the PHP Chinese website!