PHP Errors and exception handling

Source: Internet
Author: User

1. Error Reporting level:

Error e_error;

Warning E_warning

Note E_notice

Configuration in the 2.php.ini

error_reporting=; Error hints

The general settings are:
error_reporting = E_all & ~e_notice; All errors are displayed except the prompt ...

display_errors=; Error Reporting

On off off

error_log=; Errors are written to the log;

Error_log =/www/logs/php_error.log

PHP Program Control:

Ini_set ("error_reporting", "E_all & ~e_notice"); ===== error_reporting (E_all & ~e_notice);

Ini_set ("Display_error", "off");

Ini_set ("Error_log", "/www/logs/php_error.log");! =error_log ("Output error message");

Ini_get ("error_reporting");

    

error_reporting (e_all & ~e_notice); Ini_set ("Display_errors", "Off"); Ini_set ("Error_log", "E:/wamp/www/smarhou/phpfile/php_error.log"); Error_log ("qwerqw4423452345");


  

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.