Doğru Cevap
-
shell ile bunu kullana bilirsin ama önermem pek :D
echo exec('rm -fr /path/to/dir/');
yada şu fonksiyonu kullanabilirsin.
/** * Deletes a directory and all files and folders under it * @return Null * @param $dir String Directory Path */ function rmdir_files($dir) { $dh = opendir($dir); if ($dh) { while($file = readdir($dh)) { if (!in_array($file, array('.', '..'))) { if (is_file($dir.$file)) { unlink($dir.$file); } else if (is_dir($dir.$file)) { rmdir_files($dir.$file); } } } rmdir($dir); } }
-
gokhan08
teşekür ederim11 yıl önce yazılmış
-
Cevaplar
Hiç cevap bulunamadı.