How to eliminate notice in php

藏色散人
Release: 2023-03-12 19:50:01
Original
1741 people have browsed it

php method to eliminate notice: 1. Change error_reporting to "E_ALL & ~E_NOTICE" in the php.ini file; 2. Add "error_reporting(0);" to the page that prohibits notice error prompts.

How to eliminate notice in php

The operating environment of this article: Windows 7 system, PHP version 7.1, Dell G3 computer.

How to eliminate notice in php?

PHP closes notice-level error prompts

1. Change error_reporting in the php.ini file to:

error_reporting=E_ALL & ~E_NOTICE
Copy after login

2. If you cannot operate the php.ini file, you can use the following method

Add the following code to the page where you want to disable notice error prompts:

error_reporting(E_ALL^E_NOTICE);
Copy after login

or

error_reporting(0);
Copy after login

Recommended study: "PHP Video Tutorial"

The above is the detailed content of How to eliminate notice 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template