dov'è l'errore in questo codice di freephp?
codice:
<?php
// Simple text counter by RaS! (ras78@libero.it)
$counterfile="contatore.txt";
if (!file_exists($counterfile))
{
$stack=1;
$file=fopen($counterfile,"w+");
fputs($file,$stack);
fclose($file);
} else {
$file=fopen($counterfile,"r");
$tot=fgets($file,20);
$tot++;
fclose($file);
$file=fopen($counterfile,"w+");
$tot=fputs($file,$tot);
fclose($file);
}
?>
Non mi da nessun errore...ma neanche funziona...non mi mostra nulla, eppure il file l'ho creato...