超级实用的7个PHP代码片段分享
1、超级简单的页面缓存 如果你的工程项目不是基于 CMS 系统或框架,打造一个简单的缓存系统将会非常实在。下面的代码很简单,但是对小网站而言能切切实实解决问题。 复制代码 代码如下: <?php // define the path and name of cached file $cachefile = "cached-files/".date("M-d-Y").".php"; // define how long we want to keep ...