Hello, hopefully you can assist me in my effort to make a image indexing script. I have the script in one catalogue and the images in another catalogue, I want to check and print the imagesize of the images using a while-function. It works like a charm when i directly tell PHP which file to check, but i want it to be automatic.
All images in the picturecatalogue returns this error:
Warning: getimagesize(american.jpg) [function.getimagesize]: failed to create stream: No such file or directory in c:\inetpub\wwwroot\grace_develop\images\t3b.php on line 12
And here is the script:
<?
$dir_name = "picz";
$dir = opendir($dir_name);
while ($file_name = readdir($dir))
{
if (($file_name != ".") && ($file_name != "..")
&& (!preg_match("/.htm/i", "$file_name"))
&& (!preg_match("/.php/i", "$file_name")))
{
$size = getimagesize ($file_name);
print $size[0]." ".$size[1];
}
}
closedir($dir);
?>
I have been awake now for 30 hours with this script so there's probably a VERY simple solution.
If anyone can help me, i would be very happy...
Thx/ Koads