note 10691 added to fopen

From: Date: Wed, 17 Jan 2001 19:24:43 +0000
Subject: note 10691 added to fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-9897@lists.php.net to get a copy of this message
I prepared for you a very stupid counter of visits that you can put in your website, if you want. All yours <? // Visits counter $Hcounter = fopen('counter.dat','w+'); $visitors = fread($Hcounter,filesize('counter.dat')); $visitors++; rewind($Hcounter); fwrite($Hcounter,$visitors); fclose($Hcounter); echo "Visitatori a oggi: $visitors"; // End of counter - By dAm2000 ?> Bye bye http://www.php.net/manual/en/function.fopen.php

« previous php.notes (#9897) next »