2
I don’t know how to explain my problem, so I’ll illustrate:
I’m using PHP
and would like to manipulate a file . txt of n lines.
Each line has a standard size of 20 characters.
For example... the first 8 characters refer to a shipping date (ddmmaaa), the 2 next to the state of origin (SP, RJ, ...), the other 2 to the destination state and the last 8 to the product code.
Linha 1: 01012014RJPA00001472
Linha 2: 03121997MGRS00192010
...
Linha n: 28092012AMAC00000071
What I’d like to know is how to overwrite one of these terms (not the entire line, not the entire file) and save the file.
Type: On line 2 of the file I want to change the source state from MG to MT without changing the other file data. As if I took the pointer to a position before the 'MG' press the keyboard insert and type 'MT'.
if you want to work with data in this way I advise you to see about xml http://www.w3schools.com/xml/
– Silvio Andorinha