(reprise du message précédent)
!
Un pitit test :
Modifié par Heyoan (07 Nov 2008 - 16:41)
benouille68 a écrit :J'en pense que $HTTP_POST_VARS est obsolète depuis déjà un bon moment (remplacé par $_POST) et qu'en l'occurrence ce qui t'intéresse est le tableau superglobal $_FILES
Quand penses-tu ?

Un pitit test :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>test</title>
<style type="text/css" media="screen,projection">
<!--
-->
</style>
</head>
<body>
<?php
if (!empty($_FILES)) {
foreach($_FILES as $k=>$elem){
echo "nom du fichier : $k<br />\n";
foreach($elem as $key=>$value){
echo "\t $key => $value<br />\n";
}
$tmp_file = $_FILES[$k]['tmp_name'];
if( !is_uploaded_file($tmp_file) )
{
exit("Le fichier est introuvable");
}
}
}
?>
<form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p>
<input type="file" name="fichier1" />
<input type="file" name="fichier2" />
<input type="file" name="fichier3" />
<input type="submit" />
</p>
</form>
</body>
</html>
Modifié par Heyoan (07 Nov 2008 - 16:41)