Re: Re: Problem: Writing into Files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> ...

You can write a single byte to the file to "increment" the counter,
then to read the count just use filesize(). I believe the a fopen()
mode will handle locking for you. It will result in a slowly growing
file, but space isn't exactly at a premium nowadays, and when the file
gets to a certain size (eg 1 gazillion k) you could use a summary
file.

-- 
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 25th July)
Lots of PHP and Javascript code - http://www.phpguru.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux