Hi, i want to cache all the content that i generate with php.
Like this:
<?php
$output_cache="Here comes the Editor:<br />\n";
$output_cache.= $oFCKeditor->Create();
echo $output_cache;
?>
But this wont work. In the HTML File the Editor will placed exactily at the place where i wrote the command "$oFCKeditor->Create();" (over the the line "Here comes the Editor" and not under the line...) and not at the correct place in the $output_cache variable.
Any idea how can i solve the problem?
Wed, 01/14/2009 - 12:15
#1
Re: $output_cache.= $oFCKeditor->Create(); wont work :-(
<?php
$output_cache="Here comes the Editor:<br />\n";
ob_start();
$oFCKeditor->Create();
$output_cache.= ob_get_contents();
ob_end_clean();
echo $output_cache;
?>
This (ob_start) caches all the output. With ob_get_contents i can read the cached output into a variable. With ob_end_clean the caching will stopped and the cache will be deleted...