I am trying to dynamically generate an image gallery from a directory iof
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

Any Ideas?

Thanks in advance
Antony Cleave

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to