php counter

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

parxal
New php-forum User
New php-forum User
Posts: 40
Joined: Thu Nov 07, 2002 5:58 am

php counter

Postby parxal » Mon Dec 02, 2002 10:19 am

my html have :
<script language="javascript" src="http://yourdomain.com/counter.php"></script>

my counter.php have
<?
$log="counter.txt";

$open=@fopen($log,'r+');
$counter=@fread($open,filesize($log));
@fclose($open);
$counter++;
$write=fopen($log,'w');
fputs($write,$counter);
fclose($write);
echo "document.write($counter)";
?>

It doesn't work!!! why?

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Tue Dec 03, 2002 5:59 am



Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest