I'm using following code(see bottom) to list directories on my 'puter, but it refuses to print out some of the direcotires, which are only shown when removing "is_dir($path."/".$file)".
Anyone know of this problem? The folders that are not show has proper names, short names too. In one folder the subdirs where shown untill I renamned them (from "dune - forever" to just "forever"
. I'm using XP and apache 2.0.46 (i think it was) so could it have anything to do with that?
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
Anyone know of this problem? The folders that are not show has proper names, short names too. In one folder the subdirs where shown untill I renamned them (from "dune - forever" to just "forever"

Code:
function listdir($path)
{
$aDir = array();
if ($handle = opendir($path))
{
while (false !== ($file = readdir($handle)) && is_dir($path."/".$file))
{
if( $file !== "." && $file !== ".." )
$aDir[count($aDir)] = $file;
}
}
return $aDir;
}
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work