Re: Output buffering

From: Date: Thu, 03 Aug 2000 12:50:49 +0000
Subject: Re: Output buffering
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9914@lists.php.net to get a copy of this message
At 13:15 3-8-00 +0100, Darren Beale wrote:
Hi I want to evaluate some PHP code but NOT pass it to stdout, instead I want to assign it to a var and then write it to a file I've had a look around he lists etc and output buffering seems to be the kiddie, however It's not working here's what I've got: (php4.0.1pL2/redhat6.1/Apache1.3.12) in php.ini => output_buffering = Off ;
ob_start; shoulf be one the first line before anything else that outputs something not in the function Greetz, Wico
<? function top_code() { ob_start; html_header("Hello"); $output = ob_get_contents(); ob_end_clean(); return $output; } fwrite($handle,top_code()); etc.... ?> Now when this runs, html header is still evaluated, I don't want this to happen, any ideas? tia _____________________ Darren Beale bealers@back-end.org London/UK 070 9222 3289 ICQ: 18321318 _____________________ -- 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 (#9914) next »