What I have is this php code saved as a .php file
And this in my html code
I have never done any webdesign before so I am stumped on how to get this to work. I got the code from some website, what I need is I have a server that does html, no asp or anything, and I need an invisible counter on the page that writes the hit count to a txt file. Any help would be appreciated, THANKS!!
Code:
<?php
$count_my_page = ("hitcounter.txt");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
fclose($fp);
?>
Code:
<?php
include ("counter.php");
?>
Comment