RE: [PHP4BETA] Grab Output Buffer

From: Date: Wed, 15 Sep 1999 08:05:16 +0000
Subject: RE: [PHP4BETA] Grab Output Buffer
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4466@lists.php.net to get a copy of this message
On second thougts maybe a rewrite rule with !-f to check for non-existance of the cache, which maps it via a special php3 which performs a virtual/openfile("http://..." on the source php3 and then writes to file and serves. But along the lines of the original question, I have often thought it would be useful to temporarily capture to string or file what would have been written out. e.g. <% function ShowRecord($car) { %> <table><tr><td> ....etc etc <% } %> <% $record=CaptureOutput(ShowRecord($car)); %> Sam > -----Original Message----- > From: Samuel Liddicott [mailto:sam@campbellsci.co.uk] > Sent: Wednesday, September 15, 1999 08:53 AM > To: php4beta@lists.php.net > Subject: [PHP4BETA] Grab Output Buffer > > > In php4, can a copy of the output buffer be taken, and manipulated, maybe > written to file? > > The reason I ask is this: > > Spme php3 pages can be lengthy to generate but change rarely. It would be > possible to use a prepend to check the age of a cached copy on disk and > optionally serve that, or if it is somewhat dated and system load is low, > regenerate and serve the page, but then also re-write the cached copy from > the buffered output. > > Sam > > > -- > PHP 4 Beta

« previous php.version4 (#4466) next »