note 62276 rejected from function.fopen by nlopess
| From: | nlopess@php.net | Date: | Thu, 23 Feb 2006 23:06:04 +0000 |
| Subject: | note 62276 rejected from function.fopen by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-104330@lists.php.net to get a copy of this message | ||
Note Submitter: captain dot buggernuts at gmail dot com
----
I am havin alot of trouble with the following script i am using it for my college work and it is on
the index.html file.
<?php
$logfile = fopen("/cgi-bin/count.txt", "r");
$oldcount = fread($logfile,100);
fclose($logfile);
srand((double) microtime() * 1000000000);
$RandNumber = rand(1,47);
sleep($RandNumber/10);
$newcount = $oldcount+$RandNumber;
$logfile = fopen("/cgi-bin/count.txt", "w") ;
fwrite($logfile, $newcount) ;
fclose($logfile) ;
echo "number of people who have visited so far: $newcount. \n";
?>
can anyone help me because the web broser is not showing the echo