Re: Directory Entries
| From: | Jason Wong | Date: | Wed, 10 Nov 2004 02:16:40 +0000 |
| Subject: | Re: Directory Entries | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201636@lists.php.net to get a copy of this message | ||
On Tuesday 09 November 2004 17:09, Dave Lampron wrote:
> Hello I'm having problems with the following code:
>
> if (! ($dp = opendir($imagesdir))) die ("cannot open $imagesdir.");
> while($file = readdir($dp))
> {
> if ($file != '.' && $file != '..')
> {
>
> ///////Second test doesn't seem to catch sub-directories under $imagesdir
> if(is_dir($file)) ///// This is not evaluating properly!!!
Use an absolute path, or if you know your current working directory prepend
the relative path.
> echo filesize($file); ///// This is not evaluating properly either!!!
Ditto.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Anger kills as surely as the other vices.
*/