|
Operations with file content, counters, PART 10 |
<? $failas ="counter_simple.txt"; if (@filesize($failas)==0){ $fp=fopen($failas, "a"); fwrite($fp, "0"); fclose($fp); } $h=file($failas); $h[0]++; $fp = fopen($failas, "w"); echo "<br>".$h[0] ."<br>"; fwrite($fp, $h[0]); fclose($fp); ?>
|