Display PHP Errors when they don't show up.


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

This will make all errors be shown and logged. Useful for when you want to figure out what's wrong but the production server doesn't display any errors.


Copy this code and paste it in your HTML
  1. ini_set('display_errors', 1);
  2. ini_set('log_errors', 1);
  3. ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.