I'm looking to write a small amount of text (or append to the text already stored) in a .txt file on the server's HDD using JavaScript. My intention is for long-term data storage, so temporary files are out of the question. Basically, if I have a file
This is a piece of
and so is
I want to append "text" to line1 and "this" to line2, so as to produce
This is a piece of text
and so is this
I just want to use the most simple method possible. To read the file I am using an XMLHttpRequest object, so perhaps a method using that would be best (but by all means not necessary).
Thanks!