}
//删除根据目录删除子文件
function dir_del($dirpath){
$dh=opendir($dirpath);
while (($file=readdir($dh))!==false) {
if($file!="." && $file!="..") {
$fullpath=$dirpath."/".$file;
if(!is_dir($fullpath)) {
unlink($fullpath);
} else {
dir_del($fullpath);
@rmdir($fullpath);
}
}
}
closedir($dh);
$isEmpty = true;
$dh=opendir($dirpath);
dirpath | D:\wwwroot\zzdb1685\wwwroot\caches\temp\ |
dh | Resource |
file | ed7cfb16a87db14005da0e991da60024.php |
fullpath | D:\wwwroot\zzdb1685\wwwroot\caches\temp\/ed7cfb16a87db14005da0e991da60024.php |