How to block notice error in php

hzc
Release: 2023-03-01 13:32:02
Original
3801 people have browsed it

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!

Related labels:
php
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!