You can use ini_set to quickly modify the phpini configuration settings. you do not need to open phpini. in particular, when you do not modify the phpini permission on a VM, you will find that this function works.
You can use ini_set to quickly modify php. ini configuration settings, no need to open php. ini is enough, especially when you do not modify php on the VM. the role of this function will be discovered when ini is authorized. let's look at several instances.
Ini_set has the ability to change php. ini settings. this function receives two parameters, the configuration variable name to be adjusted, and the new value of the variable.
- 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"); // obtain the value of the configuration file
- Ini_set ("display_errors", "off"); // 2. disable the display error in the configuration file.
- Ini_set ("log_errors", "on"); // 3. enable the error log function
- Ini_set ("error_log", "c:/error. log"); // 4. specify the error File (writable)
- Error_log ("this is a error message !!!! "); // Output error message
- ?>
-
Error handling:1. syntax error, 2. runtime error, 3. logic error
Error report:1, error: e_error, 2, warning: e_warning, 3, note: e_notice
Suggestion:Development Stage: development outputs all error reports, which is conducive to debugging the program. running stage: Do not let the program output any error report