Código PHP:
//
$pathsub1 = "html/";
$directorio = dir($pathsub1);
$directorio->read();
$directorio->read();
/*****************************************/
echo"";
$a=0;
[COLOR="Red"]while($entrada = $directorio->read())[/COLOR]
{
$a++;
$imagen[$a] = $entrada;
}
$directorio->close();
/******************************************/
$paginas = ceil($a/1);
/******************************************/
if(!isset($page)){
$page = "1";
}
/******************************************/
$o = 1*($page-1);
/******************************************/
for ($i=1; $i<=10; $i++){
//echo "\n";
for ($e=1; $e<=1; $e++){
$o++;
$token = strtok ($imagen[$o],".");
$dotpos = strrpos($imagen[$o], ".");
$filetype = substr($imagen[$o],$dotpos+1);
switch ( $filetype){
case "html":
[COLOR="Red"]echo "$imagen[$o]";[/COLOR]
break;
}
}
}
echo "";