Here is the script:
<?
$cache_dir = './cached/';
$cache_file = '';
$cache_param = $_SERVER["QUERY_STRING"];
$cache_time = 3660;
$cache_file = $cache_dir.$cache_file.$cache_param;
// Get from the cache
if(file_exists($cache_file) && time() - $cache_time <
filemtime($cache_file)) {
include($cache_file);
exit;
}
else {
chdir("script");
include("common.php");
}
ob_start();
//code to generate content start
... ...
//code to generate content end
$outputbuf = ob_get_contents();
ob_end_clean();
include("header.php");
echo $outputbuf;
include("footer.php");
chdir("../");
$fp = fopen($cache_file,'w+');
fwrite($fp, $outputbuf);
fclose($fp);
ob_end_flush();
?>
Quote:
There doesn't look to be a problem with the code you showed us. *But not
having all the code, it's impossible to tell what might be wrong.
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -
>
- Show quoted text -