gracias por responder, pero el codigo no me funciona, lo modifique asi pero no muestra nada... fijense si esta bien lo que ise...
Código PHP:
<?
function CheckExt($filename, $ext) {
$passed = FALSE;
$testExt = ".".$ext."$";
if (eregi($testExt, $filename)) {
$passed = TRUE;
}
return $passed;
}
//Define an array of common extensions.
$exts = array("exe","swf" "html" "mp3" "wav" "voc" "txt" "php");
$dir = opendir("store/");
$files = readdir($dir);
while (false !== ($files = readdir($dir))) {
foreach ($exts as $value) {
if (CheckExt($files, $value)) {
$quitar = str_replace(".swf","", $files);
echo "<a href=\"store/$files\" class='tah11'>$quitar</a>\n";
echo "<br>";
$count++; //Keep track of the total number of files.
break; //No need to keep looping if we've got a match.
}
}
}
//Be a good script and clean up after yourself...
closedir($dir);
?>