Been scouring the web for ages and can't find a solution. So here I am.....
Firstly this is my first venture into web design and hosting. I've got my own site running from just my laptop atm. I'm trying to include a basic hit counter using the following code;
$filename = "counter.txt" ;
$fd = fopen ($filename , "r") or die ("Can’t open $filename") ;
$fstring = fread ($fd , filesize ($filename)) ;
echo "$fstring" ;
$fd = fopen ($filename , "w") or die ("Can't open $filename") ;
$fcounted = $fstring + 1 ;
$fout= fwrite ($fd , $fcounted ) ;
But when I try visiting the site I get the following error message;
"Warning: fopen(counter.txt) [function.fopen]: failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 19
Can�t open counter.txt"
If anyone can help it would be much appreciated..
Thanks in advance