function printDir($dir) { foreach(new DirectoryIterator($dir) as $item) { if($item->isDot()) { continue; } if($item->isDir()) { echo '