ID: 10898
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Filesystem function related
Operating system: Win ME & Win NT 4.0
PHP Version: 4.0.5
Description: is_dir &&  filetype return wrong values

A little script that should echo alle filetypes of all files in any subdir of the 
parent provided. 
Now I use opendir to test wether the file is a dir, but this isn't a good solution, is 

The is_dir() allways returns false
the filetype() allwyas returns dir


function getFileInfo($parent)
        $handle = opendir($parent);
        while ($file = readdir($handle))
                $filelist[]=$file ;

        while(list(,$f)=each ($filelist))
                if ($f!="." && $f!="..")
                       echo filetype($f);



Previous Comments:

[2001-05-16 06:23:07] [EMAIL PROTECTED]
Please provide a short script so that we can reproduce it.



[2001-05-16 05:44:07] [EMAIL PROTECTED]

I'm running php 4.0.5 on my win ME & Win NT 4.0 and I have experienced 2 functions 
returning the wrong values. I don't know if this bug is allready reported.

the is_dir() allways returns false except for "." && ".."
the filetype() allways returns dir


Full Bug description available at:

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