include a file up one level

Discussion in 'PHP' started by Greenmethod, Sep 30, 2008.

  1. #1
    I don't know why I can't get this to work, it seems pretty easy.
    include ('../header.php');?>
    PHP:
    is what i have and it gives me this error...

    Warning: main(../header.php): failed to open stream: No such file or directory in /home/content/J/B/l/JBlow/html/email.php on line 3

    any ideas?
     
    Greenmethod, Sep 30, 2008 IP
  2. Greenmethod

    Greenmethod Peon

    Messages:
    112
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    and when the ONLY thing on the page is:

    include ('http://www.myurl.com/header.php');

    seems like its in a never ending loop of loading, but nothing ever comes on the page.
     
    Greenmethod, Sep 30, 2008 IP
  3. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #3
    Kaizoku, Sep 30, 2008 IP
  4. spc

    spc Well-Known Member

    Messages:
    136
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    125
    #4
    try using this:

    include ('../../header.php');?>
    Code (markup):
     
    spc, Oct 1, 2008 IP