PHP - Only Show Errors in Development Stage


/ Published in: PHP
Save to your folder(s)

Only Show Errors in Development Stage (Mostrar erros somente no estágio de desenvolvimento)


Copy this code and paste it in your HTML
  1. if ($_SERVER['REMOTE_ADDR'] !== '127.0.0.1'){
  2. ini_set('display_errors','Off');
  3. } else {
  4. // error_reporting(E_ALL ^ E_NOTICE);
  5. ini_set('display_errors','On');
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.