Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $paths = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath($_get['site'])), RecursiveIteratorIterator:ELF_FIRST);
- foreach ($paths as $path) {
- $p = $path->__toString();
- if(!$path->isDir() && strpos($p, '/cache/') && !strpos($p, 'index.html'))
- unlink($p);
- }
Add Comment
Please, Sign In to add comment