This displays every directory/file within the $dir. Weird that it pulls 2 directorys that are just one and 2 dots. (. &..) anyone know what this is and how to get rid of it?
PHP Code:
<?php
include "header.inc";
$dir = "/dir Name/";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
print "<a href=\"/index.php?selectusername=$file\">$file 's Photo page</a> <br>\n";
}
closedir($dh);
}
}
?>