标签:bsp nbsp code close UNC class 递归 open 删除
/** * 递归删除缓存文件 * @param $dir 缓存文件路径 */ public function delFileByDir($dir) { $dh = opendir($dir); while ($file = readdir($dh)) { if ($file != "." && $file != "..") { $fullpath = $dir . "/" . $file; if (is_dir($fullpath)) { $this->delFileByDir($fullpath); } else { unlink($fullpath); } } } closedir($dh); }
标签:bsp nbsp code close UNC class 递归 open 删除
原文地址:https://www.cnblogs.com/zhangxilong/p/12712674.html