[Upload] Comment récupérer un fichier ?
Bonjour à toutes et à tous,
Je n'arrive pas à recuperer l'input file :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<form enctype="multipart/form-data" action="testgfile.php" method="post">
<br>
Input :
<input name="fic" type="file" size="64">
<br>
<input type="submit">
<br>
</form>
</body>
</html> |
Avec le code PHP suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Test Post File</title>
</head>
<body>
<?php
$z=$_POST["fic"];
print("<br>");
print("Erreur : ");
print($_FILES["fic"]["error"]);
print("<br>");
print($z);
?>
</body>
</html> |
J'ai bien zéro dans $_files["fic"]["error"], mais nada dans $z.
Merci de votre aide