// ========== doDelDir函数 START ==========
function doDelDir($dir)
{
$dh=opendir($dir);
while ($file=readdir($dh))
{
if($file!="." && $file!="..")
{
$fullpath=$dir."/".$file;
if(!is_dir($fullpath))
{
unlink($fullpath);
}
else
{
$this->doDelDir($fullpath);
}
}
}
closedir($dh);
if (rmdir($dir))
{
return true;
}
else
{
return false;
}
}
// ========== doDelDir函数 END ==========
// ========== doMoveDir函数 START ==========
function doMoveDir($source,$target)
{
if(is_dir($source))
{
$dest_name=basename($source);
if(!mkdir($target.$dest_name))
{
return false;
}
$d=dir($source);
while(($entry=$d->read())!==false)
{
if(is_dir($source.$entry))
{
if($entry=="."||$entry=="..")
{
continue;
}
else
{
$this->doMoveDir("$source$entry\\","$target$dest_name\\");
}
}
else
{
if(!copy("$source$entry","$target$dest_name\\$entry"))
{
return false;
}
}
}
}
else
{
if(!copy("$source$entry","$target$dest_name\\"))
{
return false;
}
}
return true;
}
// ========== doMoveDir函数 END ==========

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具

SublimeText3 Linux新版
SublimeText3 Linux最新版

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

记事本++7.3.1
好用且免费的代码编辑器