I have a flat file on the server which I append to from a HTML web form.
I need to delete the last line of the flat file before I append though.
How do i do that?
I have the following code. I'm not sure if it's correct.
$pattern = "</member>"; // what I want to look for.
$ora_books = preg_grep($patt ern, file('/path/to/your/file.txt'));
Kenneth
I need to delete the last line of the flat file before I append though.
How do i do that?
I have the following code. I'm not sure if it's correct.
$pattern = "</member>"; // what I want to look for.
$ora_books = preg_grep($patt ern, file('/path/to/your/file.txt'));
Kenneth
Comment