getimagesize() warning
Posted: Mon Nov 03, 2003 1:44 pm
hey,
i ahve a problem with a image gallaery script using getimagesze()
there are six pics in the folder. but only five warnings are printed.
also there is nothing wrong wth file permission, the fiels are all proper jpg and the path is correct as well, cause after the error mesages the pics are actually loaded. so it is confusing me alot, being a beginner ith php.
any help would be apreciated.
thanks
kumar
i have the following code
// loop through array and print each line
foreach ($data as $line)
{
// get image details
list($width, $height, $type, $attr) = getimagesize("thumb/$line");
echo "<td>";
echo "<img src=\"thumb/$line\" $attr >";
echo "</td>";
$row =$row + 1;
if ( $row == 4 ) {
echo "</tr> <tr>";
$row = 0;
}
}
this should in theory work, but im getting the following warning
Warning: getimagesize: Unable to open 'thumb/ash_n_guitar.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/brothers.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/buddies.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/clubbing_boys.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/clubbing_friends.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
i ahve a problem with a image gallaery script using getimagesze()
there are six pics in the folder. but only five warnings are printed.
also there is nothing wrong wth file permission, the fiels are all proper jpg and the path is correct as well, cause after the error mesages the pics are actually loaded. so it is confusing me alot, being a beginner ith php.
any help would be apreciated.
thanks
kumar
i have the following code
// loop through array and print each line
foreach ($data as $line)
{
// get image details
list($width, $height, $type, $attr) = getimagesize("thumb/$line");
echo "<td>";
echo "<img src=\"thumb/$line\" $attr >";
echo "</td>";
$row =$row + 1;
if ( $row == 4 ) {
echo "</tr> <tr>";
$row = 0;
}
}
this should in theory work, but im getting the following warning
Warning: getimagesize: Unable to open 'thumb/ash_n_guitar.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/brothers.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/buddies.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/clubbing_boys.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48
Warning: getimagesize: Unable to open 'thumb/clubbing_friends.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48