View Single Post

  #4 (permalink)  
Old 10-03-2006
.:[ ikciu ]:.
 
Posts: n/a
Default Re: How to read a Dir and covert it to a list that can be downloaded from a browser

Zebrawszy mysli Dave <first2try1@earthlink.net> wyklepal:
> I would like to read all the files in a given DIR and create an array
> or some other way so it can be listed in a web page and download...



PHP 5.x

scandir()

PHP 4.x

if ($handle = opendir('/path/to/files')) {
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
closedir($handle);
}


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | www: www.e-irsa.pl

2be || !2be $this => mysql_query();


Reply With Quote