slm arkadaşlar,, siteme büyük boyutta resim eklerken aşağıdaki resimde olduğu gibi hata veriyor,, ufak boyutlu resimlerde ise mesela aynı anda 10 tane resim eklediğinizde ilk 9 tanesi düzgün bir şekilde 10. ise yine aynı hatayı vererek ekleniyor,, sorunun bilen ustalar yardım edebilirse çok sevinirim,, şimdiden teşekkürler,, adres satırında resmin uzantısı .jp olarak yazıyor onu da anlamış değilim fakat .jpg yazsa bile aynı sorun var hata:
ilgili sayfadaki kod: <?php
include ($_SERVER['DOCUMENT_ROOT']."/system/generalconf.php");
$_GET['ImagePath']=$_SERVER['DOCUMENT_ROOT']."/admin/listings/pics/".$_GET['ImagePath'];
$Ext = strtolower(end(explode('.',$_GET['ImagePath'])));
switch ($Ext)
{
case 'jpg':
$Image = @imagecreatefromjpeg($_GET['ImagePath']);
break;
case 'jpeg':
$Image = @imagecreatefromjpeg($_GET['ImagePath']);
break;
case 'gif':
$Image = @imagecreatefromgif($_GET['ImagePath']);
break;
case 'png':
$Image = @imagecreatefrompng($_GET['ImagePath']);
break;
}
$Width = imagesx($Image);
$Height = imagesy($Image);
$Scale=min( $LISTING_VIEW_WIDTH/$Width,$LISTING_VIEW_HEIGHT/$Height);
if ($Scale < 1)
{
$NewWidth = $LISTING_VIEW_WIDTH;
$NewHeight = $LISTING_VIEW_HEIGHT;
$TmpImage = imagecreatetruecolor($NewWidth, $NewHeight);
imagecopyresampled($TmpImage, $Image, 0, 0, 0, 0,
$NewWidth, $NewHeight, $Width, $Height);
imagedestroy($Image);
$Image = $TmpImage;
}
header("Content-type: image/jpeg");
imagejpeg($Image);
?>