Reply to Cant process subdirs named with numbers??

Your name:

Reply:


Posted by mjstenberg on 03/05/07 15:55

Im using a batch process function but found PHP to behave very
strangely: It only reads subdirs that have caharacters in their names.
Im having subdirs with integer names (0, 1, 2, 3.. ) but this script
does not read them at all?! Can someone tell me how to get around
this?



function readSubdir($dirPath) {


chdir($dirPath);
$dirPointer = opendir(".");
while (($file = readdir($dirPointer)) != false) {
if ($file == "." || $file == "..")
continue; // skip current and upper
directories
if (filetype($file) == "dir") {
echo $file ."\n";
readSubdir($file);
} else {
// echo "file is $file\n";
} // else
} // while
closedir($dirPointer);
chdir("..");

}

Thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация