Jump to content
php.lv forumi

counters


kiks

Recommended Posts

Vienkaarshs skaitiitaajs:

<?

$desk="skait.txt";

$desk=fopen("skait.txt", "r");

$num=fread($desk, 5);

fclose($desk);

echo $num;

$num++;

$desk2=fopen("skait.txt", "w");

fwrite($desk2, $num);

fclose($desk2);

?>

 

bet operaa straadaa tikai ja spaida refresh (kad ieiet pirmo reiz tad skaitu nepalielina un raada "vecu" skait.txt veertiibu);

mana doma: uzlikt saakumaa vienu refresh bet kaa lai to uztaisa lai refresh buutu tikai viens pashaa saakumaa nevis ik peec kaadaam tur sekundeem...

varbuut veel kaads risinaajums...

Link to comment
Share on other sites

lieta taada ka explorerii viss straada taa kaa tam jaabuu - katru reizi ieejot lapaa raada naakamo skaitli;

operaa, katru reizi atverot, raada tikai vienu un to pashu skaitli, iznjemot gadijumu, ja nospiezh refresh

Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...