Standard output (printf) question...
| From: | Paul H. Breslin | Date: | Fri, 21 Dec 2001 07:39:37 +0000 |
| Subject: | Standard output (printf) question... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78431@lists.php.net to get a copy of this message | ||
I'm trying to create a function that will generate output that could go to
either a file or to the current browser directly. To do this I have something
like:
function GenerateOutput($out)
{
fwrite($out, "Some stuff");
fflush($out);
}
and to call it I tried:
$stdout = fopen("php://stdout", "w");
GenerateOutput($stdout);
But for some reason nothing shows in the browser when I do this.
I can't seem to find information about what output stream "printf" is actually
writing to. Do we have access to this stream?
Can anyone provide a hint as to why the above doesn't work?
Thanks.
_________________________________________________________________________
Paul H. Breslin http://Canadian-Artist.com
mailto:phb@Canadian-Artist.com