Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/04/2005, 18:14
Avatar de Danger_
Danger_
 
Fecha de Ingreso: diciembre-2004
Ubicación: Queretaro, México
Mensajes: 395
Antigüedad: 21 años, 9 meses
Puntos: 0
intenta asi:

Código PHP:
document.write('<?php 
$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); 
} 
?>');