版本3.2.3
$this->deldir(CACHE_PATH);
//删除文件
private function deldir($dir) {
$dh = opendir($dir);
while ($file = readdir($dh)) {
if ($file != "." && $file != "..") {
$fullpath = $dir . "/" . $file;
if (!is_dir($fullpath)) {
unlink($fullpath);
} else {
deldir($fullpath);
}
}
}
}