SyntaxFix
Write A Post
Hire A Developer
Questions
Simple and Easy...
$dir ='pathtodir'; if (is_dir($dir)) { foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename) { if ($filename->isDir()) continue; unlink($filename); } rmdir($dir); }