ID:               21921
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         *Directory/Filesystem functions
 Operating System: ALL
 PHP Version:      4.2.0
 New Comment:

Please read the manual for readdir() which explains how to deal with
this.
http://php.net/readdir


Previous Comments:
------------------------------------------------------------------------

[2003-01-28 09:09:42] [EMAIL PROTECTED]

PHP : all version
System : all system
--------------------
i find a "little problem" !
create a dir "testmanu"
inside create another dir named "titi" and another dir named "0"
(zero)
( testmanu / titi , 0 )
and try to use opendir and readdir (recursif) for find inside any
dir/file =bug ! Why ? because a dir is named "0" ! 

look and try :

<?php

// Emmanuel LELEU - [EMAIL PROTECTED] /
[EMAIL PROTECTED]
// EL - fReadRecursif - v1.0 - 28/01/2003 16:02
function fReadRecursif($sPath)
{
        Global $sChemin;


        if (!$pListe = @opendir($sChemin.$sPath))
        echo "<br>fReadRecursif - chemin introuvable : $sPath";
        
        echo "<br>path in progress : ".$sChemin.$sPath;

        while ($sDir = @readdir($pListe))
        {
                echo "<br>found : ".$sDir;
                if ($sDir!= "." && $sDir != "..")
                {

                        if (is_dir($sChemin.$sPath."/".$sDir))
                        {
                                
                                fReadRecursif($sPath."/".$sDir);
                        }               
                }
        }
        @closedir($pListe);
}

$sChemin = "./";
fReadRecursif("testmanu");
?>

manu

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21921&edit=1

Reply via email to