Skip to content

Instantly share code, notes, and snippets.

@nemanjan00
Created April 19, 2016 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nemanjan00/878416976708e91d1a11a76f9e4297f7 to your computer and use it in GitHub Desktop.
Save nemanjan00/878416976708e91d1a11a76f9e4297f7 to your computer and use it in GitHub Desktop.
<?php
function rm($dir){
$list = scandir($dir);
foreach($list as $path){
$path = $dir."/".$path;
if(is_dir($path)){
rm($path);
}
else
{
unlink($path);
}
echo $path."\n";
}
}
rm("./");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment