PHP functions to delete directories
The instance application does the function of deleting a file directory:
function Scmulu ($mlming)
{
$DKML = Opendir ($mlming);
Readdir ($DKML);
Readdir ($DKML);
while (($WJ = Readdir ($DKML))!==false)
{
$WJ = $mlming. Directory_separator. $wj;
if (Is_dir ($WJ))
{
Scmulu ($WJ);
}else
{
if (unlink ($WJ))
{
echo "File $wj deleted successfully
";
}else
{
echo "File $wj Delete failed
";
}
}
}
Closedir ($DKML);
if (RmDir ($mlming))
{
echo "Directory $mlming deleted successfully
";
}else
{
echo "Directory $mlming Delete failed
";
}
}
http://www.bkjia.com/PHPjc/445501.html www.bkjia.com true http://www.bkjia.com/PHPjc/445501.html techarticle the function instance of the PHP delete directory is applied to delete the function that has the file directory: Functions Scmulu ($mlming) {$dkml = Opendir ($mlming); Readdir ($DKML); Readdir ($DKML); while ($WJ = Readdir ($ ...