
08/04/2005, 17:09
|
| | Fecha de Ingreso: marzo-2005 Ubicación: Sevilla
Mensajes: 277
Antigüedad: 20 años Puntos: 2 | |
no
el codigo k tengo es para mostrar 5 ultimas noticias, sí hace algunhos echos:
es este:
function mifuncion(){
$nombres;
$i=0;
if ($handle = opendir("noticias/titulares/")) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$nombres[$i]=$file;
$i++;
}
}
closedir($handle);
}
$total=count($nombres);
$array_num=array();
foreach($nombres as $v){
if(ereg("resumennoticia([0-9]*).txt",$v,$out)){
$array_num[]=$out[1];
unset($out);
}
}
sort ($array_num);
$comienzo=$array_num[$total-1];
$final=$comienzo-5;
for ($j=$comienzo;$j>=$final;$j--){
$noticia="noticias/titulares/noticia" . $j . ".txt";
include($noticia);
}
} |