View Single Post
  #3 (permalink)  
Old 09-07-2008, 08:32 AM
acccapulco acccapulco is offline
Newbie
 
Join Date: Aug 2008
Posts: 5
Credits: 0
Rep Power: 0
acccapulco is on a distinguished road
Default Re: Php error handling

I am using very similar code:
PHP Code:
error_reporting (E_ALL);
function 
on_error ($num$str$file$line) {
        global 
$errors_buffer;
        
$errors_buffer[] = array('num'=>$num'str'=>$str'file'=>$file'line'=>$line);
}
set_error_handler("on_error"); 
In footer of my application I send e-mail containing $errors_buffer to myself. Users of my website doesn't see any errors and I have a message when something goes wrong.
__________________
MedBank | Kaufen Online | Online Stores
Reply With Quote