Phpini_get error setting method

Source: Internet
Author: User
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.

  1. Error_reporting (e_all); // 1. specify the error report. The error type is all.
  2. // Ini_set ("error_reporting", e_all); // temporarily change the value of the configuration file
  3. // Ini_get ("upload_max_filesize"); // obtain the value of the configuration file
  4. Ini_set ("display_errors", "off"); // 2. disable the display error in the configuration file.
  5. Ini_set ("log_errors", "on"); // 3. enable the error log function
  6. Ini_set ("error_log", "c:/error. log"); // 4. specify the error File (writable)
  7. Error_log ("this is a error message !!!! "); // Output error message
  8. ?>
  9.  

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.