You are here: fileio in php « PHP Programming Language « IT news, forums, messages
fileio in php

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация