Home  >  Article  >  Backend Development  >  PHP缓存检查

PHP缓存检查

WBOY
WBOYOriginal
2016-06-23 14:32:50792browse

简介:这是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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php闭包实验Next article:PHP扩展配置?