Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/02/2004, 17:32
blackseba
 
Fecha de Ingreso: diciembre-2002
Ubicación: Santiago de Chile
Mensajes: 350
Antigüedad: 21 años, 4 meses
Puntos: 0
yo ocupo este código:

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");
$dir opendir("TU_DIRECTORIO/");
$files readdir($dir);

while (
false !== ($files readdir($dir))) {
foreach (
$exts as $value) {
if (
CheckExt($files$value)) {
$quitar str_replace(".swf",""$files);
echo 
"<a href=\"TU_DIRECTORIO/$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);

?>