"image/pjpeg", 1 => "image/gif", 2 => "image/x-png", 3 => "image/jpeg"); if(isset($_FILES['myphoto'])) { if($_FILES['myphoto']['size'] > 0) { $fileext = substr(strrchr($_FILES['myphoto']['name'], "."), 1); $filetype = $_FILES['myphoto']['type']; if(in_array ($filetype, $allowedext_list)) { $tempfilename = $_FILES['myphoto']['tmp_name']; $filename = $imgid.".".$fileext; $filepath = $directory.$filename; if (move_uploaded_file($tempfilename, $filepath)) $message = "File uploaded successfully !"; else $message = "File uploaded failed !"; } else { $message = "The file is not a picture"; } } else { $message = "File too big"; } } if(is_file($filepath)) { $dest = $directory; thumb($directory, $filename, 130, $dest) or die ('
Upload failed while miniaturisation.
'); } else { $message = "Please contact the administrator: webmaster@verymeet.com"; } } ?>
Upload the image
Infos sur le fichier: