Visualizzazione dei risultati da 1 a 3 su 3

Discussione: help!

  1. #1

    help!

    sarà un problema stupido ma nn riesko a capire xk mi si avviano da sole la function rate5 e rat4!!! sto facendo il primo sito in php (fin ora ho usato solo html)...ki mi puo speigare xk???

    <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');
    }
    ?>
    </body>
    </html>

  2. #2
    Utente di HTML.it L'avatar di las
    Registrato dal
    Apr 2002
    Messaggi
    1,221
    se fai

    $func4 = rate4();
    $func5 = rate5();

    le stai richiamando quindi ovviamente si avviano ... la domanda è sei sicuro che non si avviino anche le altre??



    P.S. modifica il titolo della discussione se sei ancora in tempo

  3. #3
    Addio Aldo, amico mio... [03/12/70 - 16/08/03]

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.