readdir help
Posted: Fri Mar 10, 2006 10:36 am
i am trying to open a directory with this snippet here:
and it works, but i get 2 levels of directory navigation above the files in the directory, is there a way to not get them?
see:
Code: Select all
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
echo "<a href='$path2$file' target='_blank'>";
echo "$file";
echo "</a><br>";
}
closedir($handle);
}see:
.
..
img_102.gif
img_103.gif
img_62.gif