Advertisement
Sergeyphp

Untitled

Oct 2nd, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. function myError($errno, $msg, $file, $line)
  2. {
  3.     $dt  = date("d-m-Y H:i:s");
  4.     $str = "[$dt] - $msg in $file:$line\n";
  5.     switch ($errno) {
  6.         case E_USER_ERROR:
  7.         case E_USER_WARNING:
  8.         case E_USER_NOTICE:
  9.             echo $msg;
  10.     }
  11.     error_log($str, 3, "error.log");
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement