Linux/PHP question
Myrle Francis
mafmanet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Nov 3 14:53:36 EST 2008
HI,
I created a simple counter for my website and it doesn't seem to be
working. I copied it from a windows/apache installation on my local windows
machine and it works there (just not on linux)
The file that contains the hit count hitcount.txt has the attributeof rw-
rw- rw.
The program itself counter.php has the attribute of rwx r-x r-x
The code is as followes:
<?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);
echo $hits[0];
?>
could anyone please provide me with a clue as to what i'm doing wrong.
I've written another simple pnp programs on this site (rootshell.be) and I
know php works.
Thank you
Myrle
--
--
Myrle A. Francis 2nd
PgpServer(s): pgp.mit.edu
Type bits /keyID Date User ID
pub 1024D/30BDB814 2006/07/27 Myrle A. Francis 2nd <mafmanet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
Key fingerprint = 73E3 6EAF EC29 29A3 94F9 6C78 F427 0FE8 30BD B814
More information about the Discuss
mailing list