This is the code I am using to post data to txt file on server. I got this from another question on Stackoverflow:
file_put_contents('test.txt', file_get_contents('php://input'));
The code overwrites all previous text in test.txt everytime. How can I make it insert? I know that if I use fopen, I can make it insert by adding a+
$file=fopen(date("Y-m-d").".txt","a+")
Where should I add a+ in file_put_contents?