php tutorial ini_get error setting method
Use ini_set to quickly modify the php.ini configuration settings without opening php.ini. Especially when you are on a virtual host and do not have permission to modify php.ini, you will find the role of this function. See below. Just a few examples.
*/
//ini_set has the function of changing php.ini settings. This function receives two parameters: the name of the configuration variable that needs to be adjusted, and the new value of the variable.
For more details, please check: http://www.bKjia.c0m/phper/php-function/34292.htm
error_reporting(e_all); //1. Specify the error report, the error type is all
//ini_set("error_reporting",e_all); //Temporarily change the value of the configuration file
//ini_get("upload_max_filesize"); //Get the value of the configuration file
ini_set("display_errors","off"); //2. Turn off display errors in the configuration file
ini_set("log_errors","on"); //3. Turn on the error log function
ini_set("error_log","c:/error.log"); //4. Specify error file (writable)
error_log("this is a error message!!!!"); //Output error message
?>
Error handling
1. Grammar error
2. Runtime errors
3. Logical errors
Bug report:
Error:e_error
Warning:e_warning
Note:e_notice
Suggestion:
Development stage: Development is to output all error reports, which is helpful for debugging the program
Running phase: Do not let the program output any kind of error report