joomla 1.5 migration
During joomla migration I had the problem with specific directories, that could not be deleted using ftp.
The owner’s username was „nobody“…
To delete the directories on the server, I wrote this small php script.
<?php
function delete_directory($dirname) {
if (is_dir($dirname))
$dir_handle = opendir($dirname);
if (!$dir_handle)
return false;
while($file = readdir($dir_handle)) {
if ($file != "." && $file != "..") {
if (!is_dir($dirname."/".$file))
unlink($dirname."/".$file);
else
delete_directory($dirname.'/'.$file);
}
}
closedir($dir_handle);
rmdir($dirname);
return true;
}
delete_directory („components“);
?>
Schreibe einen Kommentar
Du musst angemeldet sein, um einen Kommentar abzugeben.