I have script that create directories after item's name and each directory has 2 images: big image and it's thumbnail (both jpgs)
But, when I run this code:


$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>';
}
}
}



I'm getting "<-- ???" for every folder created by script, and "<-- folder" for folders created manualy.


What could cause a problem?

-afan

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



Reply via email to