ho provato così come hai detto tu...ma niente sempre lo stesso risultato...sul documento di testo vengono scritte solo le stringhe della prima e della seconda funzione...
<?php
$func5 = rate5();
function rate5(){
$text = "text.txt";
$fu = fopen ($text,"a+") or die ("sorry, but the vote system is currently not working");
$string = "clash of the olympians Voted 5!";
fwrite ($fu,$string);
fclose($fu);
}
$func4 = rate4();
function rate4(){
$text = "text.txt";
$fu = fopen ($text,"a+") or die ("sorry, but the vote system is currently not working");
$string = "clash of the olympians Voted 4!";
fwrite ($fu,$string);
fclose($fu);
}
$func3 = rate3();
function rate3(){
$text = "rates.txt";
$fu = fopen ($text,"a+") or die ("sorry, but the vote system is currently not working");
$string = "clash of the olympians Voted 3!";
fwrite ($fu,$string);
fclose($fu);
}
$func2 = rate2();
function rate2(){
$text = "rates.txt";
$fu = fopen ($text,"a+") or die ("sorry, but the vote system is currently not working");
$string = "clash of the olympians Voted 2!";
fwrite ($fu,$string);
fclose($fu);
}
$func1 = rate1();
function rate1(){
$text = "rates.txt";
$fu = fopen ($text,"a+") or die ("sorry, but the vote system is currently not working");
$string = "clash of the olympians Voted 1!";
fwrite ($fu,$string);
fclose($fu);
}
header('location:indexa.php');
?>

Rispondi quotando