Home  >  Article  >  Backend Development  >  What should I do if php shielding warnings don’t work?

What should I do if php shielding warnings don’t work?

藏色散人
藏色散人Original
2022-11-30 09:20:405470browse

Solution for php shielding warnings not working: 1. Open the php configuration file; 2. Modify the content to "error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT&~E_WARNING&E_ERROR"; 3. Restart apache.

What should I do if php shielding warnings don’t work?

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

php What should I do if the shielding warning does not work? How to effectively block PHP warnings and error prompts?

Modify in the php configuration file.

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

The above statement means: display all error messages, except for abandoned and strict error displays.

Add warning and error error

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT&~E_WARNING&E_ERROR

and change it to ~E_ALL. No errors will be reported.

Remember to restart apache after modification.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if php shielding warnings don’t work?. 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