There is a text file in which to write the following:
Post comes $_POST['data'] Post = 1 I save this value in a text file, for example, the next post $_POST['data'] comes in which has the same value. And I need to take a unit from a text file, add the one that came to it and overwrite it in a file, that is, we save it to a file 2. During the day, there may be about 500 such posts.
Further, I would like to attribute the date of today, for example, the next day, the record goes on the next line. Is it hard to do?
I had enough of this:
$file = fopen(TEMPLATEPATH . "/analitic.txt", "w"); $txt = $_POST['data']; //$txt = 1 fwrite($file, $txt); fclose($file);