Qualcuno mi sa dire come mai mi si avviano solo le prime due funzioni quando apro questa pagina????![]()
ecco il codice:
<html>
<head>
</head>
<body>
<?php
/*mi si avviano le funzioni 4 e 5 da sole...perchè????*/
$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);
header('location:indexa.php');
}
$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);
header('location:indexa.php');
}
$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);
header('location:indexa.php');
}
$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);
header('location:indexa.php');
}
$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');
}
function brum(){return 'sono brum';}
$sbam = brum();
print ("eccolo $sbam ");
?>
</body>
</html>