How to remove notice prompt in php

PHPz
Release: 2023-03-04 17:44:02
Original
3031 people have browsed it

How to remove the notice prompt in php: You can use the error_reporting() function to achieve this. The error_reporting() function is used to set the error reporting level of the current script, such as: [error_reporting(E_ALL ^ E_NOTICE)].

How to remove notice prompt in php

Method 1:

(Recommended tutorial:php graphic tutorial)

in php Modify error_reporting

in the .ini file to:

error_reporting = E_ALL & ~E_NOTICE
Copy after login

Method 2:

(Learning video recommendation:php video tutorial)

Add the following code to the script:

/* Report all errors except E_NOTICE */ error_reporting(E_ALL ^ E_NOTICE);
Copy after login

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

Related labels:
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
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!