Bonjour, voilà j'ai un fichier texte contenant plusieurs informations ( fichier joint) et je voudrais pouvoir implanter un filtre sur le temps de connexion. J'ai déjà utilisé la fonction explode() affin d'isoler chaque informations mais sans succès.
Le résultat actuel me donne
Array
(
[0] =>
)
Merci d'avance.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 <html> <head> </head> <body> <form name="recherche" method="post" action="chemdate.php"> Entrez le chemin du fichier sarg-general souhaité : <input type="text" name="chemin"/> <input type="submit" name="Valider" value="OK"/> </form> <?php //D:\Lycee\Stage\Pgm filtre\2011Jun01-2011Jun01\sarg-general est mon fichier test if(isset($_POST['Valider'])){ $chemin=$_POST['chemin']; str_replace( '\\', '\\' , $chemin); // Modifie le chemin d'accès affin d'être lisible par php $fp = fopen($chemin,"r"); while (!feof($fp)) { $Ligne = fgets($fp,255); //récupère une ligne puis la met dans mon tableau $tab= explode(" ",$Ligne); } fclose($fp); echo '<pre>'; print_r($tab); echo '</pre>'; } ?> </body> </html>
Amicalement Akinato.
Partager