hey guys, so i have a website hosted via hostica.com, and php is enabled, but for some reason my fopen command isnt creating a file!
im trying to make a ratings system, and its not working. here's the code on one of the pages:
(or part of it at least)
$filename = "../".$g."s/".$c."/".$n.".txt";
$file = @file($filename);
$file[] = "$rating\n";
$rates = count($file);
$total = array_sum($file);
$fp = fopen($filename,'w');
foreach ($file as $line) { fwrite($fp, $line); }
fclose ($fp);
echo "<br>$rates\n votes";
echo '<br><b>Average rating</b> - <font size="+"1>'.number_format($total/$rates, 2)."</font>";