/** * 清除全部静态文件 * @param delete_file 是否删除物理文件,FALSH将只删除列表中该静态文件的地址,而不删除物理文件。 */ public function clearAll($delete_file = FALSE) { if (TRUE == $delete_file) { if ($url_list = FeiAccess('r', 'Fei_url_list')) { $url_list = explode("\n", $url_list); foreach ($url_list as $url) { $url_tmp = explode("|", $url); $realfile = $url_tmp[5]; @unlink($realfile); } } } FeiAccess('c', 'Fei_url_list'); }
/** * 清除全部函数缓存的数据 */ public function clear_all() { if ($cache_list = FeiAccess('r', 'Fei_cache_list')) { $cache_list = explode("\n", $cache_list); foreach ($cache_list as $single_item) { FeiAccess('c', "Fei_cache_{$single_item}"); } FeiAccess('c', 'Fei_cache_list'); } return TRUE; }