Home  >  Article  >  Backend Development  >  How to block notice error in php

How to block notice error in php

hzc
hzcOriginal
2020-06-10 09:41:413845browse

How to block notice error in php

The solution to shielding notice errors in PHP is:

Errors in PHP are divided into three levels: notice, warning, and error.

The PHP integrated in Wampserver prompts all levels of errors by default

You can change the error prompt level by modifying the PHP configuration file

  1. Found PHP configuration file, by entering phpinfo() in the PHP file;

How to block notice error in php

will output a page:

How to block notice error in php

The directory path in the Loaded Configuration File in the record page

Find the php.ini file through the path.

2. Find error_reporting and add ~E_NOTICE

How to block notice error in php

after ~E_ALL and then restart the server That’s it. In this way, notice errors can be blocked

Recommended tutorial: "php tutorial"

The above is the detailed content of How to block notice error in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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