How to Turn off a PHP Error Reporting
Posted on Monday, July 18, 2011
|
Comments Off
1. At the beginning of the PHP script, call the 'error_reporting' function. Pass a parameter of zero to turn off all error reporting. For example, type:
2. Turn off error reporting for all scripts in a directory by including the command in an '.htaccess' file. For example, create or edit the '.htaccess' file and type:php_value error_reporting 0
3. Edit the 'php.ini' file to turn off error reporting for all PHP scripts run on the server, unless overridden by one of the previous two directives. For example, edit the 'php.ini' file and type:error_reporting = 0