But what if you want to turn off error reporting in php using your php code? you can accomplish this easily using php built in function error_reporting()
<?php error_reporting(0); // Turn off all error reporting ?>
More info : http://www.php.net/error_reporting
Thanks. small piece of code, which I keep forgetting :P
ReplyDeleteNice and simple, what I needed.
ReplyDeleteThanks a ton, use it :)
ReplyDeleteThis is a very cool trick for those who don't have access to the php.ini file their Web host service provides. Error codes not only look ugly, but in some cases may provide too much information for the opportunistic injector to break past your site security.
ReplyDeleteMany thanks!
It doesn't work. Have it in my index.php but not working.
ReplyDeleteDo I need to reboot server? Meh.