Hello PHPhulpers :D Als ik de code hieronder heb, en roep deze functie aan met een url adres, (url adres waar het om gaat is: http://spacefrog.ath.cx/extra/phphulp/tutplaatje/afleverbon1.gif)
Dan loopt het scrip vast en doet helemaal niks meer.. moet dan tijdje wachten voor ik weer op site kan komen:
<?
function getimg($img, $www = '')
{
//--- replace spaces with right encoding ---//
str_replace(' ','%20',$img);
//--- set image sizes in $size array
$size = getimagesize("$img");
//--- check if the width is not taller than 470 pixels ---//
if ($size['0'] > 470)
{
$width = 470;
//--- calculate the differents between original and forced width ---//
$differents = $size['0'] - $width;
//--- increase the original height of the image ---//
$height = $size['1'] - $differents;
}
//--- no fucking up needed ---//
else
{
$width = $size['0'];
$height = $size['1'];
}
//--- define html code ---//
$image = "<img src=\"$img\" style=\"border: 1px solid #000000;\" width=\"" . $width . "\" height=\"" . $height . "\">";
return $image;
}
?>
Ziet iemand waarom hij zo stom doet?! :(
1.172 views