Variable $_FILE non transmise
Bonjour,
J'ai un code de chargement d'un fichier CSV. Lorsque je soumets le formulaire, je ne retrouve pas la variable $_FILE. Pourquoi?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <form method="post" action="index.php?page=cardFormHandler" enctype="multipart/form-data">
<input type="hidden" name="form" value="docImportCSV.1">
<input type="hidden" name="maxFileSize" value="200000">
<label><span>Fichier à importer</span><input type="file" name="file" style="width:60rem;"></label><br>
<label><span>Séparateur *</span><select name="separator">
<option value=",">Virgule (,)</option>
<option value=";">Point-virgule (;)</option>
<option value="|">Barre (|)</option>
<option value="">Tabulation</option>
</select></label><br>
<span class="note">* Séparateur de champ du fichier à importer<br>
<p>
<input type="submit" name="goOn" value="Continuer">
<input type="submit" name="back" value="Retour">
</p>
</form> |
Mon fichier 'index.php', commence comme ceci:
Code:
1 2 3 4
| <?php declare(strict_types=1);
session_start();
var_dump($_FILE); // retourne "Undefined variable $_FILE in C:\wamp64\www\proginet\appOmnes\index.php on line 4" |