On Wed, 30 Jun 2004 11:52:18 -0400
Alan Searle <aj*******@xxxxyahoo.com> wrote:
I'm a newbie to PHP and need to be able to get a list of the
files/sub-directories from a particular directory on the server (ie: I
want to load the list of files in the program's current directory into
an array).
You can scan a directory with
$handle = opendir("somedirectory");
while($filename = readdir($handle))
$fileslist[] = $filename;
closedir($handle);
In PHP5 there seems to be a single function scandir() which does
exactly what you want.
Greets,
Andreas
--
tcp/80
http://andreas.slashdot.ch
tcp/25
an*****@slashdot.ch
tcp/6667 irc.slashdot.ch #garbage