Home > Backend Development > PHP Problem > How to turn off notice warning in php

How to turn off notice warning in php

藏色散人
Release: 2023-03-08 08:08:02
Original
2477 people have browsed it

How to turn off notice warnings in php: 1. Modify the content in the php.ini file to "error_reporting=E_ALL & ~E_NOTICE"; 2. Add "error_reporting(E_ALL..) to the page that prohibits notice error prompts. .)".

How to turn off notice warning in php

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.

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:

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

Recommended: " PHP video tutorial

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

Related labels:
php
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 Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template