Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Created October 7, 2009 16:56
Show Gist options
  • Save rcrowley/204204 to your computer and use it in GitHub Desktop.
Save rcrowley/204204 to your computer and use it in GitHub Desktop.
unlink($argv[1]);
$ii = count(explode("/", $argv[1])) - 2;
for ($i = 0; $i < $ii; ++$i) {
if (!@rmdir($argv[1] = dirname($argv[1]))) { break; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment