Home PHP Libraries caching library PHP cache class for multi-level directories
PHP cache class for multi-level directories

Share aphp class for caching multi-level directories


The parameters are explained in detail as follows:
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');


Disclaimer

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

PHP method example code for establishing multi-level directories PHP method example code for establishing multi-level directories

04 Jul 2017

This article mainly introduces the method of establishing multi-level directories in PHP. Friends who need it can refer to it.

Second-level cache and third-level cache PHP cache class for your own use Second-level cache and third-level cache PHP cache class for your own use

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

A general method for recursively creating multi-level directories in PHP A general method for recursively creating multi-level directories in PHP

25 Jul 2016

A general method for recursively creating multi-level directories in PHP

PHP function to create multi-layer (multi-level) directories PHP function to create multi-layer (multi-level) directories

25 Jul 2016

PHP function to create multi-layer (multi-level) directories

PHP code to create multi-level directories PHP code to create multi-level directories

25 Jul 2016

PHP code to create multi-level directories

php checks and creates multi-level directories php checks and creates 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=&gt; $value){ if ( ''== ...

See all articles