I have small code.
total_request.txt is text file have content value =1
$file = 'total_request.txt';
$count = file_get_contents( $file );
echo $a = $count + 1;
file_put_contents( $file, $a );
code output value: 2
but file total_request.txt have content 3. I want to automatically increment 1 when running this file php.
what is wrong in my code?