Dopo questa modifica:
Codice PHP:
// Legge gli attributi del file (larghezza, altezza, tipo, attributi)
list($width, $height, $type, $attr) = getimagesize($_file['foto']['tmp_name'].$_file['name']);
// Crea la thumbnail (120*90 pixels)
$thumb = imagecreatetruecolor(120, 90);
$source = imagecreatefromjpeg($_file['foto']['tmp_name']);
imagecopyresized($thumb, $source, 0, 0, 0, 0, 120, 90, $width, $height);
// Salvo l'immagine ridimensionata
imagejpeg($thumb, $_file['foto']['tmp_name']."/images/thumb_", 75);
mi dà questo errore:
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in engine.php on line 42
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: Filename cannot be empty in engine.php on line 46
Warning: imagecopyresized(): supplied argument is not a valid Image resource in engine.php on line 47
Warning: imagejpeg() [function.imagejpeg]: Unable to open '/images/thumb_' for writing: No such file or directory in engine.php on line 50
Ho usato questo tutorial:
http://www.alessioluffarelli.it/guid..._thumbnail.php
Secondo me sbaglio a passare le variabili: ma come devo fare a passargliele??