PHP Tutorial-php Tutorial

Source: Internet
Author: User
Phpini_get error setting method. Php Tutorial ini_get error setting method using ini_set can quickly modify php. ini configuration settings, no need to open php. ini is enough, especially when you do not modify php on the VM. ini permission php Tutorial ini_get error setting method

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 name of the configuration variable to be adjusted and the new value of the variable.

For more details, see 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"); // 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 errors
3. logical error

Error report:
Error: e_error
Warning: e_warning
Note: e_notice

Suggestion:
Development Stage: development outputs all error reports, facilitating program debugging
Running stage: Do not let the program output any error report

Using ini_get error setting method, 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. ini permission...

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.