how to include upper level??

Discussion in 'PHP' started by lightstarm2k, Jun 18, 2008.

  1. #1
    how to include upper level path .php file??


    Please help
     
    lightstarm2k, Jun 18, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    include '../index.php';

    ?
     
    Danltn, Jun 18, 2008 IP
    lightstarm2k likes this.
  3. lightstarm2k

    lightstarm2k Well-Known Member

    Messages:
    3,626
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Oh yeah!!!! lol:D:D:D:D
     
    lightstarm2k, Jun 18, 2008 IP
  4. lightstarm2k

    lightstarm2k Well-Known Member

    Messages:
    3,626
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    140
    #4
    I am sure my code is correct, I think I have this problem on the server http://bugs.php.net/bug.php?id=40818
     
    lightstarm2k, Jun 18, 2008 IP
  5. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It looks like you're only adding a single period at the start there, which means "this directory". If you're still working on the initial problem, you're missing a period...
     
    TwistMyArm, Jun 18, 2008 IP
  6. Plazey

    Plazey Member

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6
    include_once("../filename.php");
     
    Plazey, Jun 18, 2008 IP
  7. lightstarm2k

    lightstarm2k Well-Known Member

    Messages:
    3,626
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    140
    #7
    thanks to all, it works now.
     
    lightstarm2k, Jun 19, 2008 IP