note 21280 deleted from function.ob-start by sniper

From: Date: Mon, 03 Nov 2003 15:37:13 +0000
Subject: note 21280 deleted from function.ob-start by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59698@lists.php.net to get a copy of this message
Note Submitter: lucifer@vengeance.et.tudelft.nl ---- It is impossible to call ob_start() from an ob_handler; however, if you only need one level of nesting, this might do the trick: <?php function footer( $str ) { ob_start(); include( "footer.php" ); $contents = ob_get_contents(); ob_end_clean(); return $str.$contents; } ob_start(); ?> html bla bla <?php $content = ob_get_contents(); ob_end_clean(); print footer( $content ); ?>

« previous php.notes (#59698) next »