rheumakaay: Verzeichnis auslesen

Beitrag lesen

danke hab es mir angeschaut, jetzt sieht es so aus:
<?php
$dir = "/";
$dh  = opendir($dir);
while (false !== ($filename = readdir($dh))) {
    $files[] = $filename;
}

sort($files);

print_r($files);

rsort($files);

print_r($files);

?>
<form>
    <select name="Verzeichnis">
    <option value="$dir">$name</option>
    </select>
</form>
<?php
rename($dir."\","neuer Name\");
?>
<form method="post">
<input type="text" name="dir"><input type="submit" name="submit" value="OK">
</form>
Prob is nur das er sowas in der Datei aufm Server anzeigt:
Array ( [0] => . [1] => .. [2] => bin [3] => boot [4] => cdrom [5] => dev [6] => etc [7] => home [8] => initrd [9] => initrd.img [10] => initrd.img.old [11] => lib [12] => lost+found [13] => media [14] => mnt [15] => opt [16] => proc [17] => root [18] => sbin [19] => srv [20] => sys [21] => tmp [22] => usr [23] => var [24] => vmlinuz [25] => vmlinuz.old ) Array ( [0] => vmlinuz.old [1] => vmlinuz [2] => var [3] => usr [4] => tmp [5] => sys [6] => srv [7] => sbin [8] => root [9] => proc [10] => opt [11] => mnt [12] => media [13] => lost+found [14] => lib [15] => initrd.img.old [16] => initrd.img [17] => initrd [18] => home [19] => etc [20] => dev [21] => cdrom [22] => boot [23] => bin [24] => .. [25] => . )
Wie kann ich das beseitigen?