Does anyone know of a code snippet you can add to a php webpage that will hide error reporting?
Not the php.ini file - but a webpage?
Any help would be appreciated!
Thanks
This is a discussion on Error Reporting in the Shared & Semi-Dedicated forum
Does anyone know of a code snippet you can add to a php webpage that will hide error reporting?
Not the php.ini file - but ...
Does anyone know of a code snippet you can add to a php webpage that will hide error reporting?
Not the php.ini file - but a webpage?
Any help would be appreciated!
Thanks
error_reporting(0);
more info about it: http://fi2.php.net/manual/en/functio...-reporting.php
Thanks Smo I added the snippet and the error no longer shows.
Be careful with that, though, because hiding warnings will probably make it harder for you to locate and fix real errors![]()
I'd probably use:
error_reporting(E_ERROR | E_WARNING | E_PARSE);
that should show the worst errors. e_notice is annoying..![]()
This is because you do not appreciate good advisesOriginally posted by Smo
e_notice is annoying..![]()
Warnings are designed to draw your attention to potentially 'dangerous' points. If there is no problem, it's usually very easy to modify your code to make compiler/interpreter happy. Small price to pay, IMHO.
And if there is only 1 bug on every 1000 warnings, it's still worth it in the long run![]()
Copyright © 2011 JaguarPC.com
Bookmarks