|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-28 09:33 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
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 - emmanuel.leleu@delta-development.fr / manu@cyklades.com // 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