Home  >  Article  >  Backend Development  >  How to close notice level errors in php

How to close notice level errors in php

王林
王林Original
2020-11-09 09:08:292189browse

php method to turn off notice-level errors: first open the php.ini configuration file; then modify the configuration [error_reporting=E_ALL & ~E_NOTICE]. We can also add the code [error_reporting(0);] directly to the page.

How to close notice level errors in php

The method is as follows:

(Learning video recommendation: java course)

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

error_reporting=E_ALL & ~E_NOTICE

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

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

error_reporting(E_ALL^E_NOTICE);

or

error_reporting(0);

Related recommendations: php training

The above is the detailed content of How to close notice level errors 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