$path="c:/";//your path
function GetDirArray($sPath)
//Load Directory Into Array
while ($file = readdir($handle)) if(($file!=".")&($file!=".."))
$retVal[(isset($retVal))?count($retVal):0] = $file;
//Clean up and sort
return $retVal;

//echo "test".count($a);
//for ($i=0;$i<count($a);$i++) echo $a[$i]."<br>";
<select name="select">
 for ($i=0;$i<count($a);$i++) {
  <option value="test" onchange='location="//go to the specific location
and/or file"'><?echo $a[$i];?></option>


Best regards,
George Nicolae
IT Manager
X-Playin - Professional Web Design

"Todd Cary" <[EMAIL PROTECTED]> wrote in message
> I would like to present the surfer with a list of files in a directory
> (I'll probably put then into a drop-down) and then I want to send the
> file to the surfer if one is selected.  I am not sure of the syntax to
> 1) List the files in a directory
> 2) Send a selected file to the surfer
> Many thanks for any help in getting the correct syntax to do this......
> Todd
> --
> Todd Cary
> Ariste Software

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to