<?php $path = "."; // even "." if ($dir = @opendir($path)) { while (($file = readdir($dir)) !== false) { if (is_dir($path."/".$file)) { echo $file."<br />"; } } closedir($dir); } ?>