Código PHP:
   $archivo=fopen('../logs/archivo.txt','r');
 $i=0;
while(!feof($archivo))
{            
$i++;
$linea=fgets($archivo);
$datos=explode('-', $linea);
echo  '<tr>
<td>'.$i.'</td>
<td>'.$datos[0].'</td>
<td>'.$datos[1].'</td>
<td>'.basename($datos[2]).'</td>
</tr>';    
} 
    Código PHP:
   $archivo=fopen('logs/archivo.txt','w+');
 
while(!feof($archivo))
 {
 $i++;
$linea=fgets($archivo);
$datos=str_replace('-', ';', $linea);
fwrite($archivo, $datos);    
}
fclose($archivo); 
    
 

