In the course of the PHP program running, if there are errors, whether the error message is displayed on the browser, and the level of error message display is in the program development, debugging, operation process need to control.
The following is a description of the masking and display of the PHP error message (Errors) by setting php.ini, as follows:
1. Whether the error message is displayed
Copy CodeThe code is as follows: Display error display_errors = On
Mask Error display_errors = OFF (default)
2. Display the level of error messages
Copy CodeThe code is as follows: Error_reporting = E_all (All)
error_reporting = E_all & ~e_notice (NOTICE above error will be displayed)
Here we are generally set to E_all, in the PHP program using the error_reporting () function to set the current program error information level.
3. Set whether to save the error log
In the course of the operation of the program we generally set to not display errors, so that you can save the error log to record the running status
Copy CodeThe code is as follows: Log_errors = ON (Logging error log)
Log_errors = Off (not recorded)
If you save the error log, you need to set the error log to save the file
Copy CodeThe code is as follows: Error_log = E:/php/logs/php_error.log
http://www.bkjia.com/PHPjc/769243.html www.bkjia.com true http://www.bkjia.com/PHPjc/769243.html techarticle When the PHP program is running, if there is an error, whether the error message is displayed on the browser, and the level of error messages we need in the program development, debugging, operation process ...