if( !isset($HTTP_POST_VARS["upload"]) ){
?>
>
}else{
$MAX_FILE_SIZE=2000;
$allowed_types = array("application/x-zip-compressed","application/x-tar","image/
bmp","image/jpeg,"image/gif");
$fname = $HTTP_POST_FILE['fichier']['name'];
$ftype = $HTTP_POST_FILE['fichier']['type'];
$ftype = $HTTP_POST_FILE['fichier']['size'];
$ftmp = $HTTP_POST_FILE['fichier']['tmpname'];
if (!in_array($ftype,$allowed_type) ){
die ("
format de fichier interdit! les formats autorisés sont .zip, .tgz, .bmp, .jpeg, .gif");
}
if ( $fsize > $MAX_FILE_SIZE ){
die ("taille du fichier supérieure à celle autorisée");
}
if ( copy($tmp,"/upload/".$fname) ){
echo "
$fname correctement uploadé";
}
}
?>