True I’m very new to PHP, I created this code as a counter called c_uc1.php :
<?php $count = intval(file_get_contents('c_uc1.txt')); file_put_contents('c_uc1.txt', ++$count); ?>using
<?php require('./c_uc1.php'); ?>to call it within index.php
using similar code just the text file name has been changed on the index.php
It works very well on a Wamp server and has never failed there, true it’s simple, my problem is when uploaded to a hosting site, there are two pages, the first has never failed, the second with the above code, works then stops after a few attempts, I’m guessing a register or buffer might be the problem and needs a reset after each running of the code, as I said new to php and without knowing the keyword to search for I’m lost, this simple bit of code has cost me many sleepless nights, any ideas or help will be gratefully accepted.