Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created September 30, 2014 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EdwardIII/e7c24f334441e2035239 to your computer and use it in GitHub Desktop.
Save EdwardIII/e7c24f334441e2035239 to your computer and use it in GitHub Desktop.
<?php
ini_set('display_errors', False);
set_error_handler(
function($errno, $errstr, $errfile, $errline, $errcontext){
$page = file_get_contents('500.html');
http_response_code(500);
echo $page;
},
E_ALL & ~E_NOTICE & ~E_USER_NOTICE
);
throw new Exception('bingo bango');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment