In many cases, our PHP files will appear some very difficult to troubleshoot the error, such as the output of Great white page, tuning the wrong. It is possible that PHP's error level masks some non-fatal errors, causing no error prompts. So understanding and familiarity with PHP error levels may be a new way to debug.
Error reporting level in php.ini by default, the PHP error reporting level is E_notice, and E_all indicates that all non-fatal errors are reported because they can cause large problems (such as the use of undefined variables).
Displays all errors in addition to reminders and coding standardization warnings.
Error reporting is a bit field. You can add numbers together to get the error reporting level you want.
E_all-All errors and warnings (excluding e_strict)
E_error-Fatal Run-time Error
E_warning-Runtime Warning (non-fatal error)
E_parse-Compile-time parse error
E_notice-Run-time Reminders (these are often caused by bugs in your code, or intentional behavior). )
E_STRICT-coding standardization Warning, which allows PHP to suggest how to modify the code to ensure optimal interoperability forward compatibility.
E_core_error-php fatal error during initialization during startup
e_core_warning-php warnings during startup (non-fatal error)
E_compile_error-Compile-time fatal error
E_compile_warning-compile-time warnings (non-fatal errors)
E_user_error-user-defined error messages
e_user_warning-user-defined warning messages
E_user_notice-User-Customized reminder message
If set to: E_all e_strict, all error messages are logged, which can cause a large number of error codes to appear on the Web site, but it is a good thing for programmers to optimize the code to the best; some non-fatal errors do not affect the operation of the program, But it can add to the burden of PHP, which typically adds to the burden of Web site processes, such as the IIS application pool.
Adjust error Reporting in PHP
Once you have set up PHP to show which errors have occurred, you may want to adjust the level of error reporting. You can set up a PHP installation as a whole or standalone script to report or ignore different error levels. Table 7-1 lists most of the levels, but they are generally one of the following 3 class levels:
L Note (notice), which does not prevent script execution and may not necessarily be a problem;
L Warning (warning), which indicates a problem, but does not prevent script execution;
L errors (Error), which prevents the script from continuing (including common parsing errors that fundamentally prevent the script from running).
The table 7-1 the error reporting settings for PHP, used with the error_reporting () function, or used in php.ini files. Note that the value of E_all is different from the old version of PHP and does not include e_strict (but exists in PHP 6)
||Fatal Run-time Error (it prevents script execution)
||Runtime Warning (not fatal error)
||Note (things may or may not be a problem)
||User generated error message, generated by the Trigger_error () function
||User generated warnings, generated by the Trigger_error () function
||User generated attention, generated by the Trigger_error () function
||Recommendations for compatibility and interoperability
||All errors, warnings, and suggestions