PHP缓存检查

简介:这是PHP缓存检查的详细页面,介绍了和php,php, 缓存 PHP缓存检查有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=359487' scrolling='no'>

function checkfile($file,$cachetime=60)
{
$file=ROOT_PATH.'/data/cache/'.$file.'.php';

if(is_file($file))
{

//如果文件修改(右键点击这个文件属性,有一个:修改时间)+缓存时间60秒 > 当前系统时间,说明缓存未过期
if((filemtime($file)+$cachetime>time()) || !$cachetime)
{
return true; //不更新文件
}
else
{
return false; //更新文件
}
}
return false;
}

爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

http://biancheng.dnbcw.info/php/359487.html pageNo:1

posted on 2011-11-04 13:01  圣者  阅读(112)  评论(0编辑  收藏  举报

导航