We provide webhosting for thousands of domains.
Transfer your domains to us and join our satisfied customers.
Domains from 5,99€. Renewal for the same price.
Mo-Fr: 08:00-20:00
Sa-Su: 10:00-18:00
Mo-Fr: 08:00-16:30
If you transfer your domain to us, we pay transfer fee for you.
How to recursively delete a directory?
To delete your files recursively, use this function:
function SureRemoveDir($dir) {
if(!$dh = @opendir($dir)) return;
while (($obj = readdir($dh))) {
if($obj=='.' || $obj=='..') continue;
if (!@unlink($dir.'/'.$obj)) {
SureRemoveDir($dir.'/'.$obj);
} else {
$file_deleted++;
}
}
if (@rmdir($dir)) $dir_deleted++;
}
The function deletes files created using php by deleting files writeable for the group. To use this function, make sure you have safe_mode turned off in your PHP settings.
Another safer option is to change file/directory attributes created by php and then you can delete them via FTP.
"



Print page


