How to Create Auto Counter in PHP

How to Create Auto Counter in PHP

In this article, you will learn How to Create Auto Counter in PHP. counter.php <?php $fp=fopen(“count.txt”,”r”); if(!($fp=fopen(“count.txt”,”r”))) { die(‘file not found’); } else { $counter=(int)fread($fp,20); fclose($fp); $counter++; echo “you are