How to Turn Errors on From Within a PHP File with ini_set()

It’s always best to have errors turned off in PHP when you’re running a production site. Sometimes, though, you want to show errors on a specific page. Just add this to the top of your code. Easy!

ini_set('display_errors', 1);
error_reporting(E_ALL);
  • Leave a Comment