I have a very large file. I also have a memory limit on PHP and this file is larger than my memory limit. What I would like to do is append a multiline string to this very large file. I can do that. What I have problems with is that I want to check that the multiline string was appended. How would I do that with such a large file? If the multiline string is appended I then want to remove it (or I want to do nothing if the file has something unexpected in it). How can I do this? (I can do the above with a normal file, just not with a file greater than my PHP memory limit)