Unnamed
public php v1 · immutable<?phpremoveDirectory('test');function removeDirectory($path){ if (is_dir($path)) { if ($dh = opendir($path)) { while (($file = readdir($dh)) !== false) { if ($file == "." or $file == "..") continue; if (is_dir("$path/$file")) { removeDirectory("$path/$file"); } else { unlink("$path/$file"); } } rmdir("$path") or die("Could not remove $path"); } else { die("Could not open $path"); } } else { die("$path is not a directory!"); }}?>