Trying to list a directory content HELP PLEASE
| From: | webmaster mbtradingco | Date: | Thu, 06 Jun 2002 16:47:07 +0000 |
| Subject: | Trying to list a directory content HELP PLEASE | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100954@lists.php.net to get a copy of this message | ||
I know my doubt is probable odd, but I would ask your help please.
I need a user to be able to select an image from a directory, from a
drop down box. For this I need to list all the images available on the
directory, hence, I have this code:
<select size="1" name="normal1">
<?php
chdir("/home/casapu/paginas/images/carteleras");
$direc = opendir(".");
while ($f = readdir($direc)); {
print("<option
value=\"".$f."\">".$f."</option>");
}
?>
.</select>");
but this is not working. I have reviewed the code against all the
manuals/books I have, and it says it should work but it doesn't. Anyone
knows what I'm doing wrong?
HELP PLEASE
V....V