|
Posted by a on 10/11/06 10:32
Dear all,
I just don't know why the counter.txt just contains the last digit and so
can't accumulate more than 9. furthermore, could anybody tell me in case
php.net help doesn't return explanations, what else place i can go for to
check whether I'm using the functions correctly? Thanks a lot
$filename ="counter.txt";
$handle = fopen($filename, 'r');
$content = fread($handle, filesize($filename));
list ($counter) = $content;
fclose($handle);
$handle = fopen($filename, 'w');
$counter = $counter + 1;
fwrite($handle, $counter);
fclose($handle);
Navigation:
[Reply to this message]
|