"/") $location = $location."/"; $all=opendir($location); while ($file=readdir($all)) { if (is_dir($location.$file) && $file <> ".." && $file <> ".") { RmdirR($location.$file); unset($file); } elseif (!is_dir($location.$file)) { unlink($location.$file); unset($file); } } closedir($all); unset($all); rmdir($location); } RmDirR("./temporary_files"); ?>