|
Posted by Mike Willbanks on 09/17/05 01:17
<- Chameleon -> wrote:
> I want to write all produced error messages (error, warning, notify,
> etc...) to STDERR.
> Is this possible without writing my own error handling routine?
set_error_handler('phpStderr');
function phpStderr($errno, $errstr, $errfile, $errline) {
if(error_reporting() === 0){
return;
}
file_put_contents('php://stderr'
,$errno.': Error in '.$errfile.':'.$errline.' - '.$errstr.'');
}
Mike Willbanks
Zend Certified Engineer
Navigation:
[Reply to this message]
|