not listing all directorys

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

not listing all directorys

Post by psychotomus »

Code: Select all

 
if ($dh = opendir("downloads/")) 
{
    while ($file = readdir($dh))
    {
        if(is_dir($file))
        {
            if (($file <> ".") && ($file <> ".."))
            {
                echo $file;
            }
        }
    }
    closedir($dh);
}
i have like 15 directorys in downloads directory. it only shows like 5. why?
Post Reply