Re: Standard output (printf) question...
| From: | Chris Lee | Date: | Fri, 21 Dec 2001 16:10:05 +0000 |
| Subject: | Re: Standard output (printf) question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78483@lists.php.net to get a copy of this message | ||
look at the output bufering functions.
http://php.ca/manual/en/ref.outcontrol.php
--
Chris Lee
lee@mediawaveonline.com
"Paul H. Breslin" <phb@Canadian-Artist.com> wrote in message
news:3C22E739.270D8E2@Canadian-Artist.com...
> 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