Hello
Voila mon pb, je scanne un repertoire et j'affiche sous forme tableau les fichiers sous trois colonnes:
date/nom fichier/taille
Comment faire pour avoir un tri de Date du plus recent ???
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
37
38
39 <?php $dir = 'RepZip/'; $filesLog = scandir($dir); ?> <table id="customers"> <tr> <th><input type="checkbox" name="nom_checkbox" value="une_valeur"</th> <th>Date</th> <th>Fichier</th> <th>Taille</th> </tr> <?php foreach ($filesLog as $fileLog) { if ($fileLog != '.' && $fileLog != '..') { ?> <tr> <td><input type="checkbox" name="nom_checkbox" value="une_valeur"</td> <td><?php $date = explode("_", $fileLog);echo $date[1];?></td> <td><a href=<?php echo " "."/RepZip/".$fileLog ?>><?php echo " ".$fileLog."<br>";?></a></td> <td><?php echo filesize($dir.$fileLog);?></td> </tr> <?php } } ?> </table>
je n'arrive pas a utiliser la fonction asort()
Merci
Partager