Error reporting


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



Copy this code and paste it in your HTML
  1. // DEVELOPMENT
  2. error_reporting(E_ALL | E_STRICT);
  3. ini_set('log_errors','0');
  4. ini_set('display_errors','1');
  5.  
  6. // PRODUCTION
  7. ini_set('log_errors','1');
  8. ini_set('display_errors','0');
  9. ini_set('error_log', '/full/path/to/your/file/my-errors.log');

URL: http://www.nyphp.org/PHundamentals/7_PHP-Error-Handling

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.