PHP Debug
//debug begin ini_set('display_startup_errors', 1); ini_set('display_errors', 1); error_reporting(-1); // Report all PHP errors // Report simple running errors //error_reporting(E_ERROR | E_WARNING | E_PARSE); // Reporting E_NOTICE can be good too (to report uninitialized // variables or catch variable name misspellings ...) //error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Report all errors except E_NOTICE //error_reporting(E_ALL & ~E_NOTICE); // Report no errors (no debug, prod) //error_reporting(0); //echo "<p></p>test error</p>"; exit; //debug end
.htaccess
peut aussi se mettre dans un htaccess de la façon suivante:
php_flag display_errors off