rendered paste body<?php$nbrMp3 = 3; // Nombre de mp3 à afficher$mp3s = Array();clearstatcache();function index_dir($dir){ global $mp3s; $d = opendir($dir); while ($file = readdir($d)) { if ($file == '.' || $file == '..') continue; $path = $dir . '/' . $file; if (is_dir($path)) index_dir($path); else if (is_file($path) && preg_match('/\.mp3$/i', $file)) $mp3s[$path] = filemtime($path); } closedir($d);}index_dir('musik/Elektro');arsort($mp3s);$count = count($mp3s);$i = 0;foreach ($mp3s as $mp3 => $time){ if ($i >= $nbrMp3) break; echo '<a href="' . str_replace('%2F','/', rawurlencode($mp3)) . '" >' . htmlspecialchars(basename($mp3)) . '</a><br />'; $i++;}?>