function deldir($dir) {
    $dh=opendir($dir);
    while ($file=readdir($dh)) {
        if($file!="." && $file!="..") {
            $fullpath=$dir.'/'.$file;
            if(!is_dir($fullpath)) {
                unlink($fullpath);
              } else {
                       $this->systemInfoSafe($fullpath);
                     }
          }
     } 
    closedir($dh);
    if(rmdir($dir)) {
        return true;
    } else {
        return false;
           }

}

标签: none

添加新评论