Non so dove sbaglio ma stavo facendo un contatore .. vi posot lo script:
[PHP<?php
$nomefile="conts.txt";
if(file_exists($nomefile))
{
$f= fopen($nomefile, "w");
$tempcount= fread($f, 100);
session_start();
if(!isset($_SESSION['count']))
{
$_SESSION['count']=1;
$tempcount++;
$fw=fwrite($f, $tempcount);
}
echo "Sei il visitatore numero $tempcount";
}
?>[/PHP]
La prima volta sembra scrivere ma se faccio aggiorna mi sparisce $temcount. e non aumenta ad ogni session nuova