Re: Output buffering
| From: | Darren Beale | Date: | Thu, 03 Aug 2000 13:17:52 +0000 |
| Subject: | Re: Output buffering | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9919@lists.php.net to get a copy of this message | ||
> ob_start; shoulf be one the first line before anything else that outputs
> something not in the function
Hi do you mean that I cannot output anything to the browser? _at_all_
I've moved ob_start out of the function, but I still get output of
html_header to the browser?
<?
function top_code($lev) {
html_header("Hello");
$output = ob_get_contents();
return $output;
}
$build_home_index = @fopen($index_page,"w");
if (!$build_home_index) {
print "\n<li>Error opening " . $index_page . " for writing!";
} else {
ob_start;
@fputs($build_home_index,top_code($lev));
@fputs($build_home_index,show_categories());
@fputs($build_home_index,bottom_code());
ob_end_clean();
print "\n<li>" . $front_end_url . "/index.php - Built";
}
fclose($build_home_index);
?>
tia
Bealers