You can turn on or off the PHP errors and warnings using the htaccess file
Display the PHP errors when developing and hide them when live 😉
php_flag display_errors off
Comments
I use the PHP method, you can enable or disable error outputs via PHP, so, when I have the GET variable “debug”, I see the error messages. This way I am the only one who sees the error message even in a production enviroment.
I use the PHP method, you can enable or disable error outputs via PHP, so, when I have the GET variable “debug”, I see the error messages. This way I am the only one who sees the error message even in a production enviroment.
Thanks JMLeon 😉
Sorry, the code should be
<?php ini_set('display_errors', '0'); if( $_GET['d'] ) ] ini_set('display_errors', '1'); ?>
Code language: HTML, XML (xml)Could you post an example of that method?