Bonjour,
Auriez-vous une idée pour mettre cette liste de dossier par ordre alphabétique, merci.
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 $dir = '../ledossier' ; $exclude = array ( 'images', 'bottom.gif', 'dir.gif', 'dir_close.gif', 'dir_open.gif', 'disk.gif', 'file.gif', 'index.php', 'tools.gif', 'top.gif' ); if (is_dir($dir)) { if ($handle=opendir($dir)) { while (($file=readdir($handle))!==false) { if ($file!='.' && $file!='contacts' && $file!='..' && !in_array($file, $exclude)) { if (GetMTime($file)==date("d/m/Y")) $color_day ="lnk02"; else $color_day ="lnk03"; echo '<div style="position:absolute;"><a href="index.php?history='. $file .'" class="'. $color_day .'" title="('. ucfirst($file) .') - Lire le fichier">'. GetMTime($file) .'</a> <div style="position:absolute; align:right;"><font color="#d11212"><img src="dir.gif" align="center"> <a href="' . $file . '" class="lnk01">' . ucfirst($file) . '</a></font></div></div><br>'; } if ($file=='contacts') { echo '<br /><img src="dir2.gif"> <a href="' . $file . '" class="lnk02">' . ucfirst($file) . '</a></font>'; } } closedir($handle); } }







Répondre avec citation


Partager