Tinkphp 5.0 清除缓存文件

Tinkphp中内置的清楚缓存文件方法使用

/ **

清除模版缓存不删除缓存目录
/ 
public function clear_sys_cache(){ 
Cache :: clear(); 
$ this-> success('清除成功','index / index'); 
} 
/ * 
清除模版缓存不删除temp目录
/ 
public function clear_temp_ahce(){ 
array_map('unlink',glob(TEMP_PATH.DS。'。php')); 
$ this-> success('清除成功','index / index'); 
}

/ **

清除日志缓存不删出日志目录
/ 
public function clear_log_chache(){ 
$ path = glob(LOG_PATH。'/'); 
foreach($ path as $ item){ 
array_map('unlink',glob($ item.DS。'。'));; 
rmdir($ item); 
} 
$ this-> success('清除成功','index / index'); 
}

 

你可能感兴趣的:(PHP)