Bonjour,
Quand, j'ajoute un dossier mes colonnes se décale dans mon tableau.
Si c'est possible de me donner une piste MERCI
Voici mon code php:
Vous trouverez ci joint un aperçu de mon Tableau et mon fichier.log.
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
28
29
30
31
32
33
34
35
36 <?php $filename = '/var/log/test8.log'; $handle = fopen($filename, 'r'); $datain = fread ($handle,filesize($filename)); $names_array = split ("[:]", $datain); echo "<table border=\"1\" width=\"100%\" >"; //En tête du tableau echo "<thead><tr> <th> NOM </th><th> NBR DE DOSSIER </th><th> Taille des Dossiers </th><th>NBR DE FICHIERS </th><th>NBR DE FICHIERS < 1Mo </th><th>NBR DE FICHIERS > 4Mo</th><th> </thead>"; //Boucle FOR: for ($index=4;$index<$names_array[3]+6;$index=$index+2) { echo "<tr> <th> ".$names_array[$index]." </th><th> ".$names_array[$index+1]." </th><th>".$names_array[$index+19]."</th><th>".$names_array[$index+37]."</th><th>".$names_array[$index+55]."</th><th>".$names_array[$index+69]."</th><th>\n<BR>"; } echo "</table>"; echo "<pre>"; print_r($names_array); echo "</pre>"; ?>
Merci,
Partager