Use PHP. ini to disable php error message echo. Php error display provides a lot of convenience for code debugging, allowing us to quickly locate the error. However, sometimes displaying error information can expose some sensitive information, the php error display in the program provides a lot of convenience for code debugging, allowing us to quickly locate the error. However, sometimes displaying the error information can expose some sensitive information, it has a negative impact on program security. ini configuration file, which can be closed without debugging the program, as follows:
Open PHP. ini, find display_errors, change the value to off, and set error_reporting to E_ALL. As follows:
Display_errors = Off
Error_reporting = E_ALL
You can also:
Display_errors = Off
Error_reporting = E_ALL &~ E_NOTICE
Note: If display_errors = Off is invalid, set log_errors to Off. According to official PHP documents, when log_errors is set to On, the error_log file must be specified. if the specified file is not specified or the specified file has no write permission, display_errors = Off will also be invalidated, the error message is still displayed. Therefore, if log_errors is set to Off, the problem is completely solved.
...