Can anybody give me a pointer on what i would have to do to enable me to take an entry from one flat text file and move it to another.
ie.
FILE1 FILE2
a
b
c
to end up
FILE1 FILE2
a b
c
Sorry for being vague.
Using flat text files
Moderator: General Moderators
- aerodromoi
- Forum Contributor
- Posts: 230
- Joined: Sun May 07, 2006 5:21 am
Re: Using flat text files
reading:spudmclard wrote:Can anybody give me a pointer on what i would have to do to enable me to take an entry from one flat text file and move it to another.
ie.
FILE1 FILE2
a
b
c
to end up
FILE1 FILE2
a b
c
Sorry for being vague.
Code: Select all
$file= "xyz.dta";
$fp = fopen ($file, "r" );
$olddata = fread ($fp, filesize($file));
fclose ($fp);Code: Select all
$access = fopen ($file, "w" );
fwrite ($access, $string, 800000 );
fclose ($access);aerodromoi