首页 > TAG信息列表 > deldir

删除一个不为空的目录该怎么做呢?

function deldir($path){ //如果是目录则继续 if(is_dir($path)){ //扫描一个文件夹内的所有文件夹和文件并返回数组 $p = scandir($path); //如果 $p 中有两个以上的元素则说明当前 $path 不为空 if(count($p)