Share aphp class for caching multi-level directories
First parameter: Cache secondary directory
Second parameter: Cache time Default 1800
The third parameter: Whether a third-level directory is required 0: Not required 1 Required Default 0
Fourth parameter: Cache suffix Default .html
Calling method:
$cache = new php_cache('index');
$cache = new php_cache('index',1800);
$cache = new php_cache('index',1800,1);
$cache = new php_cache('index',1800,1,'.html');
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
04 Jul 2017
This article mainly introduces the method of establishing multi-level directories in PHP. Friends who need it can refer to it.
28 Jul 2016
Second-level cache and third-level cache: PHP cache class used by the second-level cache and third-level cache: <?php/*** Cache class, data implementation, output cache* @author ZhouHr 2012-11-09 http:// www.ketann.com* @copyright version 0.1*/class Cache{private static $_instance;protected $_cacheId = null;const CLEANING_MODE_ALL = 'all';c
25 Jul 2016
A general method for recursively creating multi-level directories in PHP
25 Jul 2016
PHP function to create multi-layer (multi-level) directories
21 Nov 2016
//Check and create multi-level directories function checkDir($path){ $pathArray = explode('/',$path); $nowPath = ''; array_pop($pathArray); foreach ($pathArray as $key=> $value){ if ( ''== ...
Hot Tools
Using file caching class in php
Using file caching class in php
php+redis cache class
php+redis cache class
PHP data cache cache class
PHP data cache cache class
PHP caching class suitable for large websites
PHP caching class suitable for large websites