Home > Article > Backend Development > What should I do if php shielding warnings don’t work?
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.
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!