Log in

View Full Version : Resolved php include file not showing



biblestamps
04-25-2009, 12:59 AM
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.org/MYBethel/MB_template_page.php

and the file I am wanting to include is here:
http://www.bethelbaptistmarquette.org/MYBethel/side_navbar.php

What am I doing wrong?

thetestingsite
04-25-2009, 01:04 AM
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.

biblestamps
04-25-2009, 01:16 AM
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*

biblestamps
04-25-2009, 02:07 AM
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? :p

james438
04-25-2009, 02:17 AM
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?

biblestamps
04-25-2009, 02:33 AM
Where is the . missing? I am not seeing it.

the include line reads


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

james438
04-25-2009, 02:43 AM
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 include 'side_navbar.php'; ?> or else use

<?php include('side_navbar.php'); ?>

biblestamps
04-25-2009, 02:43 AM
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.

biblestamps
04-25-2009, 02:46 AM
That did it! Thank you!

james438
04-25-2009, 02:50 AM
no problem :)