简单高效的文件缓存php类.zip

时间:2022-07-31 04:49:28
【文件属性】:
文件名称:简单高效的文件缓存php类.zip
文件大小:4KB
文件格式:ZIP
更新时间:2022-07-31 04:49:28
类库下载-简单高效的文件缓存php类 <?php class FileCache   {        public $keyPrefix = '';        public $cachePath = '';        public $cacheFileSuffix = '.bin';        public $directoryLevel = 1;         public $gcProbability = 10;       public $fileMode;        public $dirMode = 0775;       function __construct()       {           $this->cachePath = HT::$cacheRoot.'htcache';       }          function FileCache()       {           $this->__construct();       }$dir : 缓存文件存放目录$lifetime : 缓存文件有效期,单位为秒$cacheid : 缓存文件路径,包含文件名$ext : 缓存文件扩展名(可以不用),这里使用是为了查看文件方便析构函数,检查缓存目录是否有效,默认赋值,检查缓存是否有效,写入缓存$mode == 0 , 以浏览器缓存的方式取得页面内容$mode == 1 , 以直接赋值(通过$content参数接收)的方式取得页面内容$mode == 2 , 以本地读取(fopen ile_get_contents)的方式取得页面内容(似乎这种方式没什么必要)
【文件预览】:
简单高效的文件缓存php类
----hc.php(11KB)
----php中文网下载站.url(114B)
----php中文网免费下载站.txt(219B)

网友评论