Re: Redirecting output to a file

From: Date: Wed, 17 Jan 2001 19:03:54 +0000
Subject: Re: Redirecting output to a file
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-44408@lists.php.net to get a copy of this message
http://php.net/manual/en/ref.outcontrol.php On Wed, 17 Jan 2001, Malcolm Locke wrote: > 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: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#44408) next »