Php to disable the solution to the warning problem, phpwarning_PHP tutorial-php Tutorial

Source: Internet
Author: User
Php closes the solution to the warning problem, phpwarning. Php disables the solution to the warning Problem. phpwarningerror_reporting sets the error message return level. 2047 I remember it should be E_ALL. The php. ini file contains many configuration settings. You should use php to disable the solution to the warning problem.

Error_reporting sets the error message return level

2047 I remember it was E_ALL.

The php. ini file contains many configuration settings. You should have set your php. ini file and place it in the appropriate directory, as shown in instructions for installing PHP and Apache 2 on Linux (see references ). When debugging a PHP application, you should know two configuration variables. The two variables and their default values are as follows:

Display_errors = Off
Error_reporting = E_ALL

E_ALL can be used to indicate all error information from poor coding practices to harmless prompts. E_ALL is a little too detailed for the development process, because it displays a prompt on the screen for some trivial matters (for example, the variable is not initialized), it will mess up the browser output

Therefore, we do not recommend that you use 2047. you 'd better change the default value to error_reporting = E_ALL &~ E_NOTICE

Solution for failure of display_errors = Off in PHP. ini

Problem:

In the PHP setting file php. ini, display_errors = Off is already set, but an error message still appears on the webpage during running.

Solution:

Check log_errors = On. according to the official statement, when log_errors is set to On, the error_log file must be specified. if the specified file is not specified or the specified file has no permission to write data, as a result, it will be output to a normal output channel, which will invalidate the specified Off display_errors and print the error message. Therefore, log_errors = Off will solve the problem.

Often seen error_reporting (7) meaning: Set the error message return level.

Value constant
1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING
64 E_COMPILE_ERROR
128 E_COMPILE_WARNING
256 E_USER_ERROR
512 E_USER_WARNING
1024 E_USER_NOTICE
2047 E_ALL
2048 E_STRICT
However, 7 = 1 + 2 + 4

1 E_ERROR 2 E_WARNING 4 E_PARSE is displayed when an error occurs.

The solution to the above php shutdown warning problem is to share all the content with you, hoping to give you a reference, and hope you can support the House of helpers.

Error_reporting: Set the error message return level. 2047. I remember it should be E_ALL. The php. ini file contains many configuration settings. You shall...

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.