Tue Oct 28, 2008 1:42 pm
<?php
function delete_directory($dir) {
if ($dh = @opendir($dir)) {
while (($file = readdir ($dh)) != false) {
if (($file == ".") || ($file == "..")) continue;
if (is_dir($dir . '/' . $file))
delete_directory($dir . '/' . $file);
else
unlink($dir . '/' . $file);
}
@closedir($dh);
rmdir($dir);
}
}
$dir = "./fakeDir";
delete_directory($dir);
?>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.