Re: [PHP-DEV] Redirecting output to a file

2001-01-18 Thread Malcolm Locke

 You might want to look at the Optput Buffer stuff:
 
http://www.php.net/manual/en/html/ref.outcontrol.html
 

Many thanks, this is exactly what I need.  My apologies for not finding t
in the first place

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Redirecting output to a file

2001-01-17 Thread Malcolm Locke

Please correct me if there is already a facility to do this in place, but
I have searched the manual and can find no functions.  I would like the
ability to redirect the standard PHP output stream to a file temporarily
to a file, and return to output to the browser at some point in the
script.  Here is an example of the kind of thing I mean:

?
$fd = fopen("/tmp/foo.html","w");
redirect_output($fd); print "This goes to the file";
?
So does this
?
restore_output(); print "This goes to the browser";
?

I have started to look at the source and seen that most of what I need
seems to be going on in php_output_globals int ext/standard/php_output.h.
I am willing to write the extension to give me this functionality, but
before I start coding in earnist I would appreciate any pointers or
warnings of problems that may be involved.

Many thanks,

Malcolm Locke

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]