Output buffering
| From: | Darren Beale | Date: | Thu, 03 Aug 2000 12:15:50 +0000 |
| Subject: | Output buffering | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9911@lists.php.net to get a copy of this message | ||
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 ;
<?
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
_____________________