Re: [PHP] read all files in directory

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 15:52, olinux wrote: > $dirPath = "C:\somepath"; > $dhandle = opendir($dirPath); > > while ($filename = readdir($dhandle)) { This will bail on the first directory entry which has a name which evaluates to false. Try it after 'touch 0' in the directory you're scanningth

Re: [PHP] read all files in directory

2002-05-11 Thread olinux
$dirPath = "C:\somepath"; $dhandle = opendir($dirPath); while ($filename = readdir($dhandle)) { echo $filename . ""; }// end read filenames --- Andreas Indahl <[EMAIL PROTECTED]> wrote: > Hi! > > How can I read all files in a directory, when I > don't know which files are > there? > > Sin

Re: [PHP] read all files in directory

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 15:39, Andreas Indahl wrote: > Hi! > > How can I read all files in a directory, when I don't know which files are > there? > > Sincerely > Andreas Indahl Try some of the examples from the manual: http://www.php.net/manual/en/function.opendir.php http://www.php.net/manua

Re: [PHP] read all files in directory

2002-05-11 Thread Stuart Dallas
On Sun, 12 May 2002 00:39:21 +0200, you wrote: >How can I read all files in a directory, when I don't know which files are >there? http://www.php.net/manual/en/class.dir.php -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] read all files in directory

2002-05-11 Thread Rasmus Lerdorf
See http://php.net/readdir for a full example. On Sun, 12 May 2002, Andreas Indahl wrote: > Hi! > > How can I read all files in a directory, when I don't know which files are > there? > > Sincerely > Andreas Indahl > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, vis

[PHP] read all files in directory

2002-05-11 Thread Andreas Indahl
Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely Andreas Indahl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php