Sto cercando di ridimensionare delle immagini, ma invano... il codice mi restituisce un link che riporta alla pagina stessa, nulla più.![]()
Dove erro???Codice PHP:<?php
$filename = "ole.jpg";
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
if($widht > 280) {
$newwidth = 200;
$newheight = round($newwidth * $height / $width);
}
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
?>

Rispondi quotando
