Script upload + tableur a partir d'un ficher texte

Fermé
hashnico - 11 janv. 2019 à 02:00
jordane45 Messages postés 38465 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 16 avril 2025 - 11 janv. 2019 à 08:41
Bonjour,

Je cherche a mettre en place un script qui :
- Permet de choisir un fichier texte sur son ordinateur
- L'utiliser dans le script pour afficher le tableur.

Actuellement la partie tableur est conclue, mais je galère sur la partie "Choisir le fichier".
<HTML><BODY><table border>
<tr>
<th>DATE</th>
<th>Heure</th>
<th>Lieu 1</th>
<th>Lieu 2</th>
<th>e</th>
<th>e</th>
<th>e</th>
<th>e</th>
<th>e</th>
</tr>
<?php
$lignes = file('temps.txt');
for ($i=0; $i<count($lignes); $i++) {
echo "<tr>";
$statistiques=explode("|",$lignes[$i]);
for ($a=0; $a<count($statistiques); $a++){
echo "<td>".$statistiques[$a];
}
echo "</tr>";
}
?>
</table></BODY></HTML>


Configuration: Windows / Chrome 71.0.3578.98
A voir également:

1 réponse

jordane45 Messages postés 38465 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 16 avril 2025 4 741
11 janv. 2019 à 08:41
Bonjour,

Il te faut un formulaire pour pouvoir uploader le fichier sur le serveur.
Regarde ici : https://www.w3schools.com/php/php_file_upload.asp

0