How to display / hide Errors in PHP with htaccess
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
Related PostsIf you liked How to display / hide Errors in PHP with htaccess; the posts below might interest you too:
|





December 22, 2010
11:12
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.
December 22, 2010
11:15
Could you post an example of that method?
December 23, 2010
21:20
Sorry, the code should be
<?php ini_set('display_errors', '0'); if( $_GET['d'] ) ] ini_set('display_errors', '1'); ?>December 24, 2010
12:34
Thanks JMLeon