AW: AW: [PHP] Cache Database-driven site

From: Date: Tue, 13 Mar 2001 17:17:47 +0000
Subject: AW: AW: [PHP] Cache Database-driven site
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43688@lists.php.net to get a copy of this message
Aaron, this is obviously exactly what i need!! Thanks a lot - this saved me days of work! Joe -----Ursprungliche Nachricht----- Von: Aaron Tuller [mailto:mandelbaum@olywa.net] Gesendet: Dienstag, 13. Marz 2001 05:41 An: PHP@maiersoft.de Cc: php-general@lists.php.net Betreff: Re: AW: [PHP] Cache Database-driven site all you need to do is wrap your pages in: ob_start(); // your code $page = ob_get_contents(); // write $page to a file or whatever you want to do and then depending on if this script is being called by cron or just when people load the page you can either do an ob_end_flush() or ob_end_clean() it's easy. At first I didn't beleive output buffering was that cool, now I thnk it's one of the best things PHP has to offer. You can use it for a lot of things, check it out. -aaron At 12:40 AM +0100 3/13/01, Joe Maier wrote: >Aaron, >i would love to believe what you say. >But i couldn't find any buffering functions in the online docs. > >Could you please gimme a pointer on where i can find these functions >and what's their name. Are they available in php3? > >Thanks a lot, >Joe > >-----Ursprungliche Nachricht----- >Von: Aaron Tuller [mailto:mandelbaum@olywa.net] >Gesendet: Montag, 12. Marz 2001 23:26 >An: JMaier@maiersoft.de; php-general@lists.php.net >Betreff: Re: [PHP] Cache Database-driven site > > >At 11:19 PM +0100 3/12/01, Joachim Maier wrote: >>To create the HTML-cache page i need to build the whole HTML-page content >in >>memory, instead of echoing it back to the user's browser, and finally write >>it to disk. That means, i have to write all HTML in php-code. I can't just >>embed php-parts in html tags. > >that's not true. see the output buffering functions. > >-aaron > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43688) next »