Ciao a tutti,
ho un problema con il caricamento di immagini nel codice php che ho eseguito per lo svolgimento di un esercizio.

Il Warning che ottengo è il seguente:

Warning: imagecreatefromgif() [function.imagecreatefromgif]: 'C:\xampp\tmp\php73E8.tmp' is not a valid GIF file in C:\xampp\htdocs\check_image.php on line 48
The file you uploaded was not a supported filetype.

Il codice che interessa la linea 48 è:

codice:
switch($type) {
case IMAGETYPE_GIF:
	$image=imagecreatefromgif($_FILES['uploadfile']['tmp_name']) or die ('The file you uploaded was not a supported filetype.');
	$ext= '.gif';
	break;
case IMAGETYPE_JPEG:
	$image=imagecreatefromgif($_FILES['uploadfile']['tmp_name']) or die ('The file you uploaded was not a supported filetype.');
	$ext= '.jpg';
	break;
case IMAGETYPE_PNG:
	$image=imagecreatefromgif($_FILES['uploadfile']['tmp_name']) or die ('The file you uploaded was not a supported filetype.');
	$ext= '.png';
	break;
default:
	die('The file you uploaded was not a supported filetype.');
}
Potrei anche postare tutto il codice, ma è un pò lungo.