Thats because you need to pass a valid filename to filetype().  PHP is
trying to find $file in its current directory even if $dir is
/usr/local/not/phps/current/dir.  I have fixed your example below.  (Note
that this still won't work if the last character of $dir is not a '/', so
append one where necessary)

(I think this bug can be closed also.)

Sean
======================================
Sean Bright
[EMAIL PROTECTED] / [EMAIL PROTECTED]
======================================

>       ...
>       // tried with this on and both here and at the start
>       clearstatcache();

        // UPDATED : Try this
        print($file." - ".filetype($dir . $file)."\n"); // Notice the
concatenation.

>       if(($file != ".") && ($file != "..") &&
>       ...


-- 
PHP Development 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