getimagesize error
| From: | Sascha Braun | Date: | Wed, 20 Nov 2002 13:20:42 +0000 |
| Subject: | getimagesize error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117007@lists.php.net to get a copy of this message | ||
Please can somebody help my, why i get this errormessage:
Warning: getimagesize: Unable to open '../images/2002/11/jpg/' for reading. in
C:\Webverzeichnis\docs\living_sports\living_sports\lsadmin\includes\image..handling.inc.php on line
852
While the echo $name says winter.jpg f.x.:
echo $name;
$size = getimagesize($path_to_dir.$images.$year.$month.$source.$name);
if ($size[0] > $size[1]) {
$faktor = ($size[1]/120);
$newWidth = ($size[0]/$faktor);
$command = 'convert -size 120x'.$newWidth.'
'.$path_to_dir.$images.$year.$month.$source.$name.' -resize 120x'.$newWidth.'
+profile "*" '.$path_to_dir.$images.$year.$month.$thumbs.$name;
system($command);
$Query = "UPDATE bild_db SET thumb =
'".$year.$month.$thumbs.$name."' WHERE bild_db.name =
'".$name."'";
mysql_query($Query,$connect) or die(mysql_error());
} else {
$faktor = ($size[0]/120);
$newHeight = ($size[1]/$faktor);
$command = 'convert -size '.$newHeight.'x120
'.$path_to_dir.$images.$year.$month.$source.$name.' -resize '.$newHeight.'x120
+profile "*" '.$path_to_dir.$images.$year.$month.$thumbs.$name;
system($command);
$Query = "UPDATE bild_db SET thumb =
'".$year.$month.$thumbs.$name."' WHERE bild_db.name =
'".$name."'";
mysql_query($Query,$connect) or die(mysql_error());
}
Please gimme a hint
Sascha