Ver Mensaje Individual
  #4  
Antiguo 12-08-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 937
Reputación: 24
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
NO ME FIJE QUE ERA PARA PHP... pero creo que la idea podria servir...

En algun momento de mi vida tube que realizar algo parecido pero en clipper...

Como lo hice en su momento...

1) Defini una tabla que contenia
i) Fila_Del_Campo
ii) Columna de Inicio del Campo
ii) Largo del campo
ii) Tipo del campo
ii) Nombre_Campo
Deberia quedar asi:
Suponiendo que se estan leyendo esto:
Cita:
To: Timon Tours Printed on 09-AUG-2010
MASTIL NO.2 INT 2 XXXXXXXXXXXX 23:46:15
Fila-Columna-Largo-Tipo-Nombre
-------------------------------
2 27 12 TITULO

2) Luego puedes cargar el contenido en un TStringsList y proceder a realizar la busqueda de los datos que se definieron.

Como lo haria yo
Código Delphi [-]

   Lineas.LoadFromFile(fArchivo);
   
   While Not Formato.Eof Do
   begin
          strLinea:=Lineas[formato.fieldbyname('FILA').AsInteger];
          Valor:=Copy(strLinea, Formato.FieldByName('COLUMNA').AsInteger,Formato.FieldByName('LARGO').AsInteger)
         {En valor debe estar el contenido que requieres...}
          Formato.next;
          
   End;



Espero haberte ayudado...
Responder Con Cita