Entry
I need to read a file line by line, add something different to ea. line, then write it to file
May 7th, 2002 22:27
David Price, Richard Choy,
Refer to the filesystem functions in the PHP manual available at
http://www.php.net/manual/en/ref.filesystem.php
Basicly you want to do this
$fs = fopen( 'filesource', 'r' );
$fd = fopen( 'filedestination', 'w' );
while( ! feof( $fs ) )
{
$tmp = fgets( $fs );
# replace this line with whatever you want to do to each line
$tmp = process_line( $tmp );
fputs( $fd, $tmp );
}
fclose( $fd );
fclose( $fs );