Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/12/2003, 23:09
Volrath
 
Fecha de Ingreso: septiembre-2003
Ubicación: Pirexia
Mensajes: 150
Antigüedad: 20 años, 7 meses
Puntos: 1
LISTO jejeje, disculpa por el askeroso codigo ke t pase ayer, realmente estaba muy muy dormido :P, asi ke hoy tenia un poco d tiempo libre, y leyendo un script de un contador de usuarios online sin mysql me acorde d este post jejeje (=S), asi ke planee otra respuesta, aki esta el codigo:

Código PHP:
<?
$file 
"archivo.txt";
$arr file($file);

for ( 
$i $i sizeof($arr) ; $i $i+) {
    
$arr[$i] = $arr[$i]."</tr><tr>\n";
}

$contenido implode(""$arr);

$fp fopen($file,'w');
fputs($fp$contenido);
fclose($fp);

//mostramos la alteracion del contenido para verificar errores:

$contenido htmlspecialchars($contenido);
$contenido nl2br($contenido);
echo 
$contenido;
?>
ya lo probe, y funciona a la perfeccion creo, pero tienes ke estar conciente en una cosa, el texto fuente (es decir, el ke kieres transformar), no puede ser asi:

<table class=enlaces>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
</table>

sino asi:

<table class=enlaces>
<tr>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
<td width="50%"></td>
</tr>
</table>

y eso si supongo ke lo puedes hacer a mano...
esto es todo...
salu2x.
__________________
In a world without walls, who needs Windows?