Home > Backend Development > PHP Tutorial > PHP error_reportingSet error reporting level_PHP tutorial

PHP error_reportingSet error reporting level_PHP tutorial

WBOY
Release: 2016-07-15 13:34:50
Original
843 people have browsed it

Set the error log report level in

. In some cases, some errors cannot be displayed because of the incorrect error level setting. You must understand the errors for this function. Log report level, including the following levels:

PHP error_reporting is used to set the level of error message reporting. The parameter level is an integer bit mask (bitmask), see the table below.

Mask value represents name

1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING
0 Close error Report

E_NOTICE indicates that the normal situation is not recorded, and is only used when the program has an error, such as trying to access a non-existent variable, or calling the stat() function to view a non-existent file.

E_WARNING is usually displayed but does not interrupt program execution. This is useful for debugging. For example: calling ereg() with the problematic regular notation.

E_ERROR is usually displayed and will interrupt program execution. This means that memory configuration or other errors cannot be traced using this mask.

E_PARSE Parses errors from the syntax.

E_CORE_ERROR Like E_ERROR, but excludes errors caused by the PHP core.

E_CORE_WARNING Like E_WARNING, but does not include PHP core error warnings.

The above is the detailed usage of PHP error_reporting.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445951.htmlTechArticle is set in the error log report level. In some cases, due to the incorrect setting of the error level, some errors cannot be displayed. For this function, you must understand the error log reporting level, including...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template