I have a page that is getting a list of directories and displaying them with links to those directories. As it is right now, it works, but it shows the “.” and “..” directories. How can I not display these directories? Below is a code snippet of how I am getting the directories:
[code]
// directory name
$dir = getcwd();
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
$ignore_regexp = “Chicks_with_Attitudes|CVS|^_vti_|index.php|TEXT.CSS|config.php”;
if (ereg($ignore_regexp ,$filename)) {
continue;
}
$dirs[] = $filename;
$dirnames = str_replace(“_”,” “,$dirs);
}
sort($dirs);
sort($dirnames);