Delet category and documents powerfully

function myrmdir($parth)
{
$handle=opendir($parth);
while ($file = readdir($handle))
{
if ($file=='..' || $file=='.') continue;
if (is_file($parth.'/'.$file))
{
echo 'del document:'.$parth.'/'.$file.'
‘;
unlink($parth.’/’.$file);
}
else myrmdir($parth.’/’.$file);
}
closedir($handle);
echo ‘del category:’.$parth.’
‘;
rmdir($parth);
}
myrmdir(’myparth’);
?>

Chang myparth to the path you plan to del, save as del.php, upload del.php to the space you want to del document or category. All the files will be deleted.

Posted in Php Code.