简单的PHP页面缓存技术
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了简单的PHP页面缓存技术相关的知识,希望对你有一定的参考价值。
<?php // define the path and name of cached file // define how long we want to keep the file in seconds. I set mine to 5 hours. $cachetime = 18000; // Check if the cached file is still fresh. If it is, serve it up and exit. include($cachefile); exit; } // if there is either no file OR the file to too old, render the page and capture the html. ?> <html> output all your html here. </html> <?php // We're done! Save the cached content to a file // finally send browser output ?>
以上是关于简单的PHP页面缓存技术的主要内容,如果未能解决你的问题,请参考以下文章