Home
» Other Stuff » php suppress errors
php suppress errors
| March 30, 2009 | Posted by The Futtock under Other Stuff |
Comments off
|
When you have your PHP script up and running on the web, you might want to suppress any errors as they can show visitors some of the inner workings of your scripts.
Here are three basic levels of error suppresson or lack of it:
error_reporting(0); // Suppress all errors
ini_set (“display_errors”, “1″); // Suppress all but fatal errors
error_reporting(E_ALL); // Show all errors. Good for debugging
For more on this see:
http://uk.php.net/error_reporting
Also you can put an at “@” before any function to suppress errors it might generate.
Recent Comments