Actually, when using flat files, you can open the file with a standard fopen. In the parenthetical statement after the name of the file, you would then put the designation of your action in quotes and close the parenthetical. The designation to add a line at the end of a file is "a" for append. Others include "r" for read, "w" for write and so forth (Check file modes for a complete listing). The statement would look like this: $fp=fopen("filename.ext","a"); where $fp is the file pointer.
Now, after this, you would make your statement for the appends using fwrite (EX. fwrite($fp,string_to_add));and then you would close the file with fclose (EX. fclose($fp)).