Phpdisplay_errors and log_errors. This article summarizes the usage of phpdisplay_errors and log_errors. For more information, see this article. Display_errors error Echo, which is commonly used in development mode. However, this article summarizes the usage of php display_errors and log_errors. For more information, see this article.
Display_errors
Error Echo, which is commonly used in development mode. However, many applications forget to disable this option in the formal environment. Error Echo can expose a large amount of sensitive information to facilitate the next attack. Disable this option.
Display_errors = On
If an error occurs in the Enabled status, an error is returned.
Dispaly_errors = Off
If an error occurs, the system prompts "Server Error. But no error message appears.
You can define the switch in the program.
// Ini_set ("display_errors", "On"); // display all error messages */
Ini_set ("display_errors", "Off"); // block all error messages
It should be noted that, in the server configuration file, notice errors are blocked and only error errors are displayed. if so, you can enable the error display without displaying notice errors.
Log_errors
Use this in the official environment and record the error information in the log. You can disable error echo.
Set whether to record the error information of script running to the server error log or error_log. Note that this is a specific configuration item related to the server.
Note:
In the production system, it is strongly recommended that you use error logs to record the error information displayed on the web site.
Log_errors_max_len integer
Set the maximum number of bytes for log_errors. the error source information is added to error_log. The default value is 1024. if it is set to 0, the length is not limited. This length is set to the error of the record, the error displayed, and $ php_errormsg will be used for limited production.
When integer is used, the value is measured in bytes. You can also use the stenographer described in the FAQ.
Display_errors and log_errors usage introduction. For more information, see this article. Display_errors error echo, usually used in development mode, but very...