If an error occurs while the PHP program is running, whether the error information is displayed in the browser, and whether the error information is displayed at the level that we need to control during the process of program development, debugging, and operation
If an error occurs while the PHP program is running, whether the browser displays the error message or not, and the level of the error message is what we need to control during the process of program development, debugging, and operation.
The following describes how to set php. ini to control the shielding and display of PHP error messages (errors:
1. whether the error message is displayed
Error display_errors = On
Blocked error display_errors = Off (default)
2. display error information level
Error_reporting = E_ALL (all)
Error_reporting = E_ALL &~ E_NOTICE (errors above Notice will be displayed)
Here we usually set it to E_ALL, and use the error_reporting () function in PHP to set the error information level of the current program.
3. set whether to save the error log.
In the process of program operation, we usually set to do not display errors, so that you can record the running status by saving the error log.
Log_errors = On (records error logs)
Log_errors = Off (not recorded)
If you save the error log, you need to set the error log to save the file at the same time.
Error_log = e:/php/logs/php_error.log