Turn off error_reporting Notice for one php file

I simply want to turn off the notice messages for one php file. I see the code on php.net.

Let’s say you have myFileA.php. I can turn off php notices on entry. Will changing the error_reporting only affect myFileA.php and it’s includes/requires? Or will it effect the entire website from that point forward?

I am wondering if I have to reset back to the original error level at the end of the myFileA.php file.

It’s just for the duration of your script, so it will affect the includes/requires.

Thanks for your help.

Sponsor our Newsletter | Privacy Policy | Terms of Service