A problem with include code

Discussion in 'PHP' started by macas, Sep 12, 2008.

  1. #1
    I'm stuck with this problem and don't know what I'm doing wrong :(


    in html page , main page :

    
    <?php include('headbutton.php'); ?>
    
    <?php include('c_container_files/c_beerpong.php'); ?>	
    
    <?php include('down_menu.php'); ?>
    
    
    
    Code (markup):
    and then c_beerpong.php >>

    
    <!--------------------------------- start container ------------------------------------>
    <div id="xellbox">
    
    <div id="xellbpost">
    
    <?php include('container_files/navigation_flashgames.php'); ?>	
    
    <?php include('container_files/top_ads.php'); ?>	
    
    <!--------------------------------- start of postblock ------------------------------------>
    <?php include('flash-games_pb/beerpong.php'); ?>	
    <!--------------------------------- end of postblock ------------------------------------>
    
    <?php include('container_files/cool_links.php'); ?>	
    
    </div>
    
    </div>
    <!--------------------------------- end container ------------------------------------>
    
    
    Code (markup):
    beerpong.php page doesn't matter now , it works ok when all others include code are in root ....

    I don't get it , why is path invalid , what I miss here ?

    or what is valid path for this case ? :confused:

    tnx :)
     
    macas, Sep 12, 2008 IP
  2. shotazi

    shotazi Peon

    Messages:
    422
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If include codes are in .html file it doesn't work, you must save it in .php file
     
    shotazi, Sep 12, 2008 IP
  3. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    try to use relative path..
     
    vetrivel, Sep 12, 2008 IP
  4. macas

    macas Active Member

    Messages:
    170
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    and how relative path looks like ? Sry , I don't too much about php codes :(
     
    macas, Sep 12, 2008 IP