Re: Populate picklist from directory and return file name
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Populate picklist from directory and return file name

From: sunbum <mbrashars@gmail.com>
Date: Tue Sep 13 2005 - 16:33:04 CEST

Here is what I have now ... (without the line numbers)

1)<?
2) # Directory
3) $dir = "\inetpub\wwwroot\templogs\";
4)
5) print "<select name='file'>";
6) $dir = opendir($dir);
7) while (false !== ($file = readdir($dir))){
8) if (in_array($file, array(".", ".."))) continue;
9) print "<option value='$file'>$file</option>";
10) }
11) print "</select>";
12)
13)
14)?>

Still gives "Parse error: parse error, unexpected T_STRING in (script)
on line 5

:(

Mike
Received on Mon Oct 24 02:09:59 2005