4 Responses to “How to display / hide Errors in PHP with htaccess”

  1. JMLeon December 22, 2010 at 11:12 am #

    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.

    • quicoto December 22, 2010 at 11:15 am #

      Could you post an example of that method?

    • JMLeon December 23, 2010 at 9:20 pm #

      Sorry, the code should be
      [code]
      <?php
      ini_set(‘display_errors’, ‘0’);
      if( $_GET[‘d’] ) ] ini_set(‘display_errors’, ‘1’);
      ?>
      [/code]

    • quicoto December 24, 2010 at 12:34 pm #

      Thanks JMLeon 😉

Leave a Reply

Add <code> Some Code </code> by using this tags.