Advertisement
niammuddin

fungsi redirect jika error php scripts

Jul 27th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2. function fatalErrorHandler(){
  3. $error = error_get_last();
  4. if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR))
  5. echo '<script language="javascript"> window.location.href = "'.get_bloginfo('url').'" </script>';}
  6. register_shutdown_function('fatalErrorHandler');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement