Skip to content

Instantly share code, notes, and snippets.

@unlight
Last active October 12, 2015 15:47
Show Gist options
  • Select an option

  • Save unlight/4050104 to your computer and use it in GitHub Desktop.

Select an option

Save unlight/4050104 to your computer and use it in GitHub Desktop.
Remove all files
$Directory = new RecursiveDirectoryIterator('/tmp');
foreach(new RecursiveIteratorIterator($Directory) as $File) {
$Filepath = $File->GetPathName();
unlink($Filepath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment