included external php file - loading problem

Discussion in 'PHP' started by Lpspider, Jul 13, 2007.

  1. #1
    Okay, I have a situation in which I'm trying to include a file from a directory outside of my site's main directory.

    Looks like this:

    public_html/wordpress/themes/header.php
    public_html/vbulletin/header.php

    I'm trying to include the wordpress header inside the vbulletin header.

    however, when I try this - or if I view the header by itself - I get this error:

    Fatal error: Call to undefined function: bloginfo() in /home/user/public_html/journeymantv/wp-content/themes/curved-10/curved-10/header.php on line 5
    Code (markup):
    The problem is that the header file is calling other php functions/includes and such so it doesn't load.

    Is there any way for me to include the wordpress header in the vbulletin site? Perhaps I could make the wordpress header load on it's own before being included elsewhere in the vbulletin site?

    I'd greatly appreciate some help.

    Thanks,
    Daniel
     
    Lpspider, Jul 13, 2007 IP
  2. Lpspider

    Lpspider Well-Known Member

    Messages:
    2,216
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Anyone want to help me out here?
     
    Lpspider, Jul 14, 2007 IP
  3. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    be patient. someone will eventually answer. sometimes you have to wait a day but someone will answer.

    you mentioned that when you view the header by itself it doesnt load and you get the same error. which header file. the vbulletin header after you include?

    it seems to be mucking with undefined function: bloginfo()

    Im not too good with php yet but i want to try to help you. what if you tore the pages apart a little and made seperate files to what is causing the issue and then include those where needed. thats the first thing i usually try when things get messy. but then making more pages get messy too

    hope that helped a little :S
     
    Dirty-Rockstar, Jul 14, 2007 IP
  4. Lpspider

    Lpspider Well-Known Member

    Messages:
    2,216
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Nope, the wordpress header file.

    A function included in the wordpress system, I assume.

    Hmmm... I'm not sure what you mean, to be honest.
     
    Lpspider, Jul 14, 2007 IP
  5. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    if you can take the function: bloginfo() out of the script. make another page called bloginfo.php and include it in your other page

    thats if you only want that function on 1 page. if you want it on the 2 of then then this step is pointless.
     
    Dirty-Rockstar, Jul 14, 2007 IP