最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 缓存设计
时间:2011-10-01 编辑:简简单单 来源:一聚教程网
php
$cahetime=2;//设置过期时间
$cahefile="cahe.txt";//读写文本
if(file_exists($cahefile) && time()-$cahetime< filemtime($cahefile)){
echo file_get_contents($cahefile);
}
else {
file_put_contents($cahefile,date("y-m-d H:i:s",time()));
}
?>
-
下一个: php md5加密函数参考详解
相关文章
- PHP Opcode缓存加速组件:APC详解介绍 10-31
- opcache PHP新的字节码缓存扩展详解 09-09
- PHP嵌套输出缓存的例子 03-06
- PHP缓存集成库phpFastCache学习教程 12-06
- PHP中常用的缓存技术介绍 12-06
- php开发指南:缓存详解 09-18