Re: output buffering display handlers....

From: Date: Wed, 17 Mar 2004 02:35:22 +0000
Subject: Re: output buffering display handlers....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180640@lists.php.net to get a copy of this message
Hi, Wednesday, March 17, 2004, 11:36:02 AM, you wrote: P> Hi Folks, P> I am trying to use outbuffering techniques.... P> ob_start(myCallBack) P> ..... P> ob_end_flush() P> function myCallBack($inBuffer) P> { P> //process P> ob_start(); P> include "aPHPFile.php"; P> $includeFileContents = ob_get_contents(); P> ob_end_clean(); P> } P> I am seeing the following error "Cannot use output buffering in output P> buffering display handlers" ...is there an workaround of including this file P> using the php engine or alternative solution of getting access to php P> internal outbuffer inside an output handler callback... P> Thanks you could try something like this ob_start(myCallBack) ..... ..... ob_start(); include "aPHPFile.php"; $footer = ob_end_flush(); ob_end_flush() function myCallBack($inBuffer) { //process return $inbuffer.$GLOBALS['footer']; } Depends what you are trying to achieve over a simple include at the end??? -- regards, Tom

« previous php.general (#180640) next »