On Mon, Feb 18, 2002 at 01:12:54PM +0000, Jenny_Hopkins@toby-churchill.com wrote:
Can anyone help me with a bit of php? I need to append the copntents of one file on to another when a web page is accessed. Cron is no use as the timing isn't fixed. I can append a line of text so far, but not the contents of a file, and as I'm away for the rest of the week and have been doing this manually till I find the fix, I'm panicking! - - help!
Off the top of my head ..
$fp = fopen("file1",a); $arr = file("file2"); while(list($i,$line) = each($arr)) fwrite($fp,$line);
where file1 is the file to be appended.
Mal