You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
784 B

<?php
$data_path = str_replace('\\', '/', dirname(dirname(dirname(dirname(__FILE__))))) . '/mobile/data/caches/';
$dir = array('data', 'static', 'tpl');
foreach($dir as $k=>$v){
$dirName = $data_path . $v;
delFile($dirName);
}
function delFile($dirName){
if(is_dir($dirName) && $handle = opendir($dirName)){
while(false !== ($item = readdir($handle))){
if($item != "." && $item != ".."){
if(file_exists($dirName.'/'.$item) && is_dir($dirName.'/'.$item)){
delFile($dirName.'/'.$item);
}else{
if(@unlink($dirName.'/'.$item)){
continue;
}
}
}
}
closedir($handle);
}
}