Home  >  Article  >  Backend Development  >  How to avoid displaying warnings in php

How to avoid displaying warnings in php

coldplay.xixi
coldplay.xixiOriginal
2020-09-28 14:19:402671browse

How to not display warnings in php: First find the corresponding configuration file [php.ini]; then look for the [display_errors] attribute; finally change it to Off, save and restart.

How to avoid displaying warnings in php

How to not display warnings for php:

1. First, determine the version of PHP in your project, and then Find the corresponding configuration file php.ini, and press Ctrl F under Windows to find the display_errors attribute. If the original value is On, then change it to Off, then save it, and restart the server to remove the Warning prompt.

How to avoid displaying warnings in php

#2. If there are still warnings on the page after setting the display_errors attribute to Off, then open your phpinfo() and check the configuration information. Ctrl F finds the display_errors attribute. If the values ​​of Local Value and Master Value are inconsistent, it means that you have set local values ​​elsewhere, which affects the global attributes.

How to avoid displaying warnings in php

3. You can Ctrl Shift F to search the display_errors attribute globally in your project. This value must be additionally set in other configuration files.

How to avoid displaying warnings in php

#4. After finding it, set the value of the display_errors attribute to Off, save the file and open the program again to see if there is still a Warning prompt.

How to avoid displaying warnings in php

If you want to learn more about programming, please pay attention to the php training column!

The above is the detailed content of How to avoid displaying warnings 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