Error messages in PHP

Source: Internet
Author: User
Tags parse error

php.ini file to configure user-side output error messages

In PHP.ini, a semicolon, indicating a comment.
The types of errors that php.ini will be able to display are categorized as follows.
; (6143) E_all-All errors and warnings, (not including e_strict).
; (1) E_error-Fatal Run-time error
; (4096) E_recoverable_error-Errors that can be captured by the exception handling mechanism (CATCH/HANDLE)
; (2) E_warning-Runtime Warning (non-fatal error)
; (4) E_parse-Compile-time parse error
; (8) E_notice-Runtime hints, which are often caused by bugs in the code, may be intentional (such as using an uninitialized variable, in fact it is automatically initialized to an empty string).
; (2048) E_strict-Runtime hints that can give PHP suggestions to change your code to get the best synergy and improve code compatibility.
; (16) e_core_error-php Initializes a fatal error during startup.
; (32) E_core_warning-php Initializes a non-fatal error during startup.
; (64) E_compile_error-Fatal compilation error.
; (128) e_compile_warning– compilation error (non-fatal error).
; (256) E_user_error-User error message.
; (512) E_user_warning-User warning message.
; (1024) E_user_notice-user prompt information.

Error_reporting control the kind of message output to the client in php.ini.
error_reporting = E_all
Represents the output of all information.
error_reporting = E_all & ~e_notice Indicates the output of all errors except the hint.
error_reporting = e_compile_error| e_recoverable_error| e_error| E_core_error
Represents the output of all ERROR information.

In PHP.ini, the display_errors can set whether to output the error information set above to the client.
Display_errors = on output to client (easy to open when debugging code)
Display_errors = Off message will not be output to the client (remember to change to off when it is finally released to the user)

Thank you, Bo Master: http://hi.baidu.com/ken00821/blog/item/0839630b4619ac34b0351de1.html

Error messages in PHP

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.