Buon pomeriggio, ho trovato qui su free.php uno script per la gestione di un sondaggio, il problema č che,
non capisco per quale motivo, in locale funziona e on-line no.

In pratica,questo script tiene traccia delle votazioni su .txt(conta_voti.txt),in locale registra perfettamente
il numero dei voti per ogni brano votato, ma on-line non riesce a inserire e aggiornare i valori immessi.
Un'altra cosa,i file per il sondaggio sono dentro la cartella public.

Questo č lo script nella pagina risultato_voti.php:
<html>
<head><title>Votazione MP3</title></head>
<style>
.links{text-decoration : none; color : White;}
.links:Hover{color:Orange;}
</style>
<body>
<?php
$RESULT_FILE_NAME = "conta_voti.txt";
$ANSWER = array("La riva", "Sempre nei miei pensieri", "Immagine", "Siamo", "Desiderio","Sospesa");
$IMG_DIR_URL = "./vote";
//$REVOTE_TIME = 3600;

if (! $vote && ! $result) {
echo "<form method='POST'>";
echo "<table border='1' width='250' height='100' bordercolor='white'>";
while (list($key, $val) = each($ANSWER)) {
echo "<tr>
<td width='10%' align='center'>
<input type='radio' name='answer' value='$key'></td>
<td>
<font face='Verdana, Arial, Helvetica, sans-serif' color='White' size='-4'>
$val
</font>
</td>
</tr>";
}
echo "<tr>
<td align='center'>
<input type='Submit' name='vote' value='Vota'>
</td>";
echo " <td align='center'>
<input type='Submit' name='result' value='Risultati'>
</td>
</tr>";
echo "</table>
</form>";
} else {

$file_array = file($RESULT_FILE_NAME);// or error("Impossibile Aprire il File \$RESULT_FILE_NAME");
if ($answer < count($ANSWER) && $vote) {
if (count($file_array) < count($ANSWER)) {
$file_array = array("0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n");
}
$old_answer = $file_array[$answer];
$old_answer = preg_replace("/\n\r*/", "", $old_answer);
$file_array[$answer] = ($old_answer + 1)."\n";

$file = join('', $file_array);//join aggiunge spazi agli elementi contenuti nell'array
$fp = fopen($RESULT_FILE_NAME, "w");// or error("Impossibile Aprire il File \$RESULT_FILE_NAME");
flock($fp, 1);
fputs($fp, $file);
flock($fp, 3);
fclose($fp);
//echo "rate saved";
}
while (list($key, $val) = each($file_array)) {
$total += $val;
}
echo "<table border=1 width='340' height='100'>";
echo "<tr>
<td width='50%' height='10%'><font size='-1' color='White'>Brano</font></td>
<td width='40%' height='15%'><font size='-1' color='White'>Percentuale</font></td>
<td width='10%' height='15%' align='center'><font size='-1' color='White'>Voti</font></td>
</tr>";

while (list($key, $val) = each($ANSWER)) {
$percent = $file_array[$key] * 100 / $total;
$percent_int = floor($percent);
$percent_float = number_format($percent, 1);
$tp += $percent_float;
echo "<tr><td><font size='-1' color='White'> $ANSWER[$key] </font></td><td><img height=9 src=\"$IMG_DIR_URL/vote_left.gif\"><img height=9 width=\"$percent_int\" src=\"$IMG_DIR_URL/vote_middle.gif\"><img height=9 src=\"$IMG_DIR_URL/vote_right.gif\"><font size='-1' color='White'> $percent_float % </font></td><td align='center'><font size='-1' color='White'>$file_array[$key]</font></td></tr>";
}
echo "</table>";
echo "<font size='-1'>Indietro";
echo "";
echo "Chiudi</font>";
}
?>
</body>
</html>

per il .txt basta farne uno nuovo conta_voti.txt

poi ci sono le immagini che indicano la percentuale dei voti ricevuti.
Questo č tutto quello che comprende il sondaggio.

Sapreste dirmi per favore come mai ho questo problema?
Grazie mille a tutti....