Re: is_dir & is_file bugs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>     $path = 'product_images';
>     $handle = opendir($path);
>     while (false !== ($file = readdir($handle)))
>     {
>          if ($file != "." && $file != "..")
>         {
> echo $file;
>             if (is_dir($file))
>             {
>                 echo ' <-- folder<br>';
>                 $folders[] = $file;
>             }
>             elseif (is_file($file))
>             {
>                 echo ' <-- image<br>';
>                 $images[] = $file;
>             }
>             else
>             {
>                 echo ' <-- ???<br>';
>             }
>         }
>     }

try the absolute path in is_dir and is_file

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux