This article introduces, how to configure the php.ini file to implement the method of blocking PHP errors, for everyone to learn the reference. Configure the relevant content in the PHP configuration file php.ini to block PHP related errors. as shown below:; Error handling and logging;; Error control and registration;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The error report is bitwise. Or add up the numbers to get the error report level you want.; E_all-all errors and warnings; E_error-Fatal run-time error; E_warning-Runtime Warning (non-fatal error); E_parse-Compile-time parsing error; E_notice-Runtime Reminders (these are often caused by bugs in your code, or intentional behavior). (for example, an uninitialized variable is automatically initialized based on an uninitialized variable), and the fact of an empty string is used; E_core_error-fatal error occurred during initialization of PHP startup; E_core_warning-A warning (non-fatal error) that occurs during initialization during PHP startup; E_compile_error-Compile-time fatal error; E_compile_warning-Compile-time warning (non-fatal error); E_user_error-error message generated by the user; E_user_warning-user-generated warning message; E_user_notice-A user-generated reminder message; Example:; error_reporting = E_all & ~e_notice; Show all errors except reminders; error_reporting = e_compile_error| e_error| E_core_error; Show only Errors error_reporting = E_all & ~e_notice; Show all errors except reminder display_errors = on; Displays the error message (as part of the output); On the final published Web site, it is strongly recommended that you turn off this feature and use it; Error log instead (see below).; Continue to make display_errors available in the final published Web site; Expose some information about security, such as the path to a file on your Web service; Your database planning or other information. Display_startup_errors = OFF; Even when Display_erroes is open, it happens in PHP's start-up steps; The error will not be displayed.; It is strongly recommended to keep the display_startup_errors closed; In addition to the process of error-changing. Log_errors = OFF; Error recorded in log fileError (server-specified log, stderr standard error output, or Error_log (below)); As stated above, it is strongly recommended that you log errors in the final published Web site, instead of the direct error output. Track_errors = OFF; Save the most recent error/warning message to the variable $php _errormsg (boolean); error_prepend_string = ";"; The string to be output before the error message; error_append_string = ";"; The string to output after the error message; error_log = filename; Logs the error log to the specified file; error_log = syslog; Logging error log in Syslog (NT event Log, Windows 95 not valid) warn_plus_overloading = OFF; When the ' + ' is used for strings, the warning is removed; E_warning-run-time warning (non-fatal error) |