Showing posts with label stderr stdout redirect php standard output error. Show all posts
Showing posts with label stderr stdout redirect php standard output error. Show all posts

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);