Wednesday, July 6, 2011

redirect php standard error and output

fclose(STDIN);
fclose(STDOUT);
fclose(STDERR);
       
 $STDIN = fopen($options["logLocation"], "r");
 global $STDOUT;global $STDERR;
 $STDERR = $STDOUT = fopen($options["logLocation"], "a+");


set_error_handler(array('System_Daemon', 'phpErrors'), E_ALL);

No comments:

Post a Comment