note 62276 added to function.fopen

From: Date: Thu, 23 Feb 2006 23:02:48 +0000
Subject: note 62276 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-104329@lists.php.net to get a copy of this message
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: &nbsp; $newcount. \n"; ?> can anyone help me because the web broser is not showing the echo ---- Server IP: 84.18.202.180 Probable Submitter: 82.34.89.80 ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+62276 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62276&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+62276&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104329) next »