Home >Backend Development >PHP Problem >How to hide warning in php

How to hide warning in php

藏色散人
藏色散人Original
2022-01-27 10:37:132971browse

How to hide warnings in php: 1. Modify the properties in the php.ini file to "display_errors = Off error_reporting = E_ALL"; 2. Write "error_reporting(0)" at the beginning of the php file.

How to hide warning in php

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

How to hide the warning in php?

How to hide warning prompts in php

Method 1:

Modify the following properties in the php.ini file

display_errors = Off
error_reporting = E_ALL

Method 2:

Write at the beginning of the php file:

<?php error_reporting(0); ?>

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to hide warning 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