Results 1 to 10 of 10

Thread: php include file not showing

  1. #1
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question php include file not showing

    I'm sorry, I did search the forums (and google!) as i am sure this has been asked. I found two suggestions, both failed (although I stopped getting errors and now the php include file is simply not showing...I guess that is an improvement! ) I do have php on my server (godaddy.com for now).

    The page I have put the 'php include' on is here: (I have taken over this site recently and I am redoing the whole thing)
    http://www.bethelbaptistmarquette.or...plate_page.php

    and the file I am wanting to include is here:
    http://www.bethelbaptistmarquette.or...ide_navbar.php

    What am I doing wrong?
    Last edited by biblestamps; 04-25-2009 at 02:46 AM. Reason: resolved

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Whenever I click on the links you posted, all I get is the HTML source code printed on the screen. Not really sure what is happening, but if you are sure that the file you are trying to include is in the location you are trying to call it from, you may want to talk to your webhost.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    WOW. That literally just happened because I clicked on the page to copy/paste the link here and it was fine when I did that. I will have to figure that out somehow...*sigh*

  4. #4
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I have it working again now. I have NO idea what I did but fixing it involved deleting the entire folder off the server, re-uploading every page, converting them all to .php files and now I m back to where I started with errors showing up instead of the php include file.

    Did I mention I know just enough to be dangerous?

  5. #5
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I notice your file location is missing a period, so it reads side_navbarphp as opposed to side_navbar.php

    what does your include line look like?
    To choose the lesser of two evils is still to choose evil. My personal site

  6. #6
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Where is the . missing? I am not seeing it.

    the include line reads
    Code:
    <td height="125" bgcolor="#6095BB"><?php include(side_navbar.php); ?>&nbsp;</td>

  7. #7
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I was just noticing that on your test page the first line of your warning reads:

    Warning: main(side_navbarphp)

    but it looks like it was due to missing quotes.

    Try putting your included file in quotes as opposed to parentheses:
    PHP Code:
    <?php include 'side_navbar.php'?>
    or else use
    PHP Code:
    <?php include('side_navbar.php'); ?>
    To choose the lesser of two evils is still to choose evil. My personal site

  8. The Following User Says Thank You to james438 For This Useful Post:

    biblestamps (04-25-2009)

  9. #8
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I see where it is missing...in the error info on the page...? I noticed that as well before...I guess I thought it was simply how the error wrote it out and didn't think much of it.

  10. #9
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    That did it! Thank you!

  11. #10
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    no problem
    To choose the lesser of two evils is still to choose evil. My personal site

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •