AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > PHP编程

php文件缓存实例代码

51自学网 2016-09-17 http://www.wanshiok.com

使用过程:
php代码
<?php      define("_cachepath_","./cache/");      define("_cacheenable_","1");      define("_recachetime_","43200");      include('cache.php');      $cache=new cache();      if ($cache->check()) {          $template=$cache->read();      }else {          ob_start();          ob_implicit_flush(0);  ?>  页面内容。。。。  <?php      $template = ob_get_contents();      $cache->write($template);  }  ?>


说明
:本教程来源互联网或网友上传或出版商,仅为学习研究或媒体推广,wanshiok.com不保证资料的完整性。
 
上一篇:PHP如何读取xml文件?php读取xml文档例子  下一篇:php无刷新上传文件代码