non mi salva l'immagine.
Codice PHP:
$filename = $_FILES["photo"]["name"];
Codice PHP:
$source = imagecreatefrompng($filename);
list($width, $height) = getimagesize($filename);
$newwidth = $width/5;
$newheight = $height/5;
$destination = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($destination, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
$filename3 = pathinfo($_FILES['photo']['name'], PATHINFO_FILENAME);
$imm=$filename3."2".".png";
echo '<script type="text/javascript">alert("'.$imm.'");</script>';
imagejpeg($destination, $imm, 100);