Can't include multiple local PHP files :(

Discussion in 'PHP' started by Jonhoo, Jan 29, 2006.

  1. #1
    Hello everyone :)

    My problem is as follows:
    I'm making a page using PHP, and including varios files for navigation bars and such.. However, my problem is that I can't include multiple PHP files locally.. After including the first one, everything after that has to be an html include, or a remote php include...

    To illustrate:
    
    <?php
    echo <<<BEGINHTML
    <html>
    
    <head>
    </head>
    
    <body>
    
    BEGINHTML; //This will print
    include("banner.htm"); //As will everything from here to
    echo "\n##Printed banner\n";
    include("leftnohtml.php");
    echo "\n##Printed leftnohtml";
    include("mainnohtml.htm");
    echo "\n##Printed mainnohtml"; //Here
    require("rightnohtml.php"); //This one however, will not print
    echo "\n##Printed rightnohtml"; //Not this either
    echo <<<ENDHTML //Or any of the following...
    
    </body>
    
    </html>
    ENDHTML;
    ?>
    
    PHP:
    If I replace
    require("rightnohtml.php");
    PHP:
    with
    require("http://www.internationalfriend.com/rightnohtml.php");
    PHP:
    Then it works.. I can't include this way though, since then I don't have access to the GET variables through the rightnohtml script...

    Anyone know what may cause this problem?

    Thanks in advance :D
    Jon
     
    Jonhoo, Jan 29, 2006 IP
  2. fried2009

    fried2009 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey you're using the wrong php code for includes <?php include 'test.php' ?>
     
    fried2009, Jan 29, 2006 IP