Help with php include and folders

Discussion in 'PHP' started by gre, Oct 20, 2007.

  1. #1
    Can't get php include to work propperly when i have folders, like .com/video/fun.php

    In index.php i use the "normal" include, like below which works fine.
    <?php include 'includes/nav.php'; ?>

    But for fun.php the normal include doesn't work, I did try to add .../ before includes/nav.php but that seems to be wrong.

    Its probably easy to fix but im not into php.
     
    gre, Oct 20, 2007 IP
  2. rspenc29

    rspenc29 Peon

    Messages:
    256
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    include('../../includes/nav.php');
     
    rspenc29, Oct 20, 2007 IP
  3. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You want '../includes/nav.php'
     
    matthewrobertbell, Oct 20, 2007 IP