PHP's error echo provides a lot of convenience for code debugging, allowing us to quickly find the error, but sometimes the display of error messages can expose some sensitive information and negatively affect the security of the program. With the php.ini configuration file, we can close the program without debugging it, by doing the following:
Open php.ini, locate display_errors, change the value to OFF, and set error_reporting to E_all. As shown below:
Display_errors = Off
error_reporting = E_all
The following can also be:
Display_errors = Off
error_reporting = E_all & ~e_notice
Note: If setting Display_errors = off is not effective, set log_errors to OFF. According to the official PHP information, when the log_errors is set to ON, you must specify the Error_log file, if not specified or the specified file does not have write permission, then the Display_errors=off will be invalidated, the error message will be displayed, so that the log _errors = Off, the problem is solved completely.
http://www.bkjia.com/PHPjc/756843.html www.bkjia.com true http://www.bkjia.com/PHPjc/756843.html techarticle PHP's error echo provides a lot of convenience for code debugging, allowing us to quickly find the error, but sometimes the display of the error message can expose some sensitive information to the program ...