schematiquement :
 
compteur.php
 
<?
 
  function add_clic( $compeur_fichier )
    {
     // ouverture en r/w : verifier le mode r+ , ch'uis pas sur
     if (! ($fp=fopen($compteur_fichier,"r+" ))
       return false;
 
     $nb = fgets($fp,10);
     $nb++;
 
     fputs($fp,$nb);
     fclose($fp);
   
     return $nb;
    }
?>
 
ma_page.php
 
<?  
  include("compteur.php" );
  $compteur_texte = "compteur.txt";
  if (!$nbvisit = add_clic($compteur_texte))
     echo " - echec compteur - ";  
?>
<html>
etc..etc..
 
<? echo $nbvisit ?>
 
</html>
 
 ---------------
			
Do androïds dream of electric sheep ?