Re: Problem with is_file function on WinNT and apache HELP!
| From: | ReDucTor | Date: | Fri, 13 Jul 2001 15:30:28 +0000 |
| Subject: | Re: Problem with is_file function on WinNT and apache HELP! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57739@lists.php.net to get a copy of this message | ||
http://www.evilwalrus.com/download_agree.php?codeEx=304
is a good example of
using directory handles, works in windows...
----- Original Message -----
From: Antony Cleave <a.cleave@bigbluesky.uk.net>
To: <php-general@lists.php.net>
Sent: Saturday, July 14, 2001 1:17 AM
Subject: [PHP] Problem with is_file function on WinNT and apache HELP!
> I am trying to dynamically generate an image gallery from a directory iof
> images.
> To do this I am using the following code
>
> while (false!==($file = readdir($handle)))
> {
> if ((is_file($file)))
> {
> echo ...... Link info here
> }
> }
> Only problem is that none of the files in the folder apper to be files
> according to PHP
> I tried using
>
> if (!(is_dir($file))
> This returns every entry in the folder bar . and ..
> BUT it includes the all of the other directories in the directory.
> As I need to check the file extension before I link to it this is a
serious
> problem as PHP crashes apache when trying to find the file extension of a
> directory.
>
> Any Ideas?
>
> Thanks in advance
> Antony Cleave
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>