Home >Backend Development >PHP Problem >What is the command to enable php error reporting?
How to enable PHP error reporting:
1. Modify the php.ini file
; 第一处修改 ; display_errors = Off display_errors = On ; 第二处修改 ; error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT error_reporting = E_ALL | E_STRICT
2. Call the following function at the beginning of the php file
//禁用错误报告 error_reporting(0); //报告运行时错误 error_reporting(E_ERROR | E_WARNING | E_PARSE); //报告所有错误 error_reporting(E_ALL);
For more related knowledge, please pay attention to PHP Chinese website! !
The above is the detailed content of What is the command to enable php error reporting?. For more information, please follow other related articles on the PHP Chinese website!