How to change error reporting for an individual PHP page

Place the following code at the top of a PHP page to turn error reporting on. This will only affect the page the code was added to, not the entire site or server.
<? error_reporting ( [int level] ) ?>

Example to display all errors:
<?php error_reporting(E_ALL); ?>

Other possible levels:
E_ERROR
E_WARNING
E_PARSE
E_NOTICE
E_CORE_ERROR
E_CORE_WARNING
E_COMPILE_ERROR
E_COMPILE_WARNING
E_USER_ERROR
E_USER_WARNING
E_USER_NOTICE
E_ALL
E_STRICT

For more information:
http://us4.php.net/error_reporting

Add Feedback