There are two ways to open and close the PHP error prompt, one in the php.ini configuration file. The other is the use of function Ini_set () and error_reporting () settings in PHP files.
1. Find the display_errors in php.ini, set the error prompt to turn on and off, off and on. Setting the Error_reporting value also represents the wrong level.
Some common values
E_all (Show all errors, warnings and notices including coding.) All errors
E_all & ~e_notice (Show all errors, except for notices) except notification, all errors
2. If you cannot modify the php.ini file, PHP also provides the relevant functions to dynamically configure.
Ini_set (' display_errors ', ' off '), turning off error prompts.
Ini_set (' display_errors ', ' on '); Open the error prompt.
Error_reporting (E_all & ~e_notice) sets the error level.
Some common frameworks, or CMS systems, use these two functions to control the display of PHP errors.
Implementation in micro-engine
Define (' DEVELOPMENT ', $_w[' config '] [' setting '] [' DEVELOPMENT '] = = 1);
if (DEVELOPMENT) {
Ini_set (' display_errors ', ' 1 ');
Error_reporting (e_all ^ e_notice);
} else {
error_reporting (0);
}
Dream Weaving
include/common.inc.php