11-17-2010, 07:24 PM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Feb 2008
Posts: 13
Thanks: 3
|
Getting Extra Files Shown In Folder???
I am using this code in a PHP script to list all the files in a folder.
PHP Code:
<select name="menu1">
<?php
$dir = "/img/logos";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
print "<option value=\"{$file}\">{$file}</option>\n";
}
closedir($dh);
}
}
?>
</select>
Works great EXCEPT i'm getting extra files being read in the folder and showing just as dots?
You can see from this screen that i have no other files in the directory but this screen shows the extra in my dropdown menu?
Any help?
|
|
|
|