search
HomePHP Librariescaching libraryPHP 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 directoriesPHP method example code for establishing multi-level directories

04Jul2017

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 useSecond-level cache and third-level cache PHP cache class for your own use

28Jul2016

Second-level cache and third-level cache: PHP cache class used by the second-level cache and third-level cache:

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

25Jul2016

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

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

25Jul2016

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

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

25Jul2016

PHP code to create multi-level directories

php checks and creates multi-level directoriesphp checks and creates multi-level directories

21Nov2016

//Check and create multi-level directories function checkDir($path){ $pathArray = explode('/',$path); $nowPath = ''; array_pop($pathArray); foreach ($pathArray as $key=> $value){ if ( ''== ...

See all articles