Jump to content

<?php include> not working


thecryoflove

Recommended Posts

Hello. This should be a fairly simple PHP page... yet it is not working. I have "header.php" and a "menu.php" that I am calling in the "index.php" with include . Both "header.php" and "menu.php" contain one HTML table starting and ending with the <table></table> tags. Here is what is in between my body tags on index.php

 

<div><?php include("header.php"); ?></div>

<div><?php include("menu.php"); ?></div>

<div><?php include("under.txt"); ?></div>

 

The menu.php content is appearing and so is the text in under.txt... however no content from header.php is visible...

 

go to www dot apeacefulpride dot com to see my problem.... don't understand why the header won't show any help would be appreciated

Link to comment
https://forums.phpfreaks.com/topic/122056--/
Share on other sites

view source shows me this:

 

<div><table bgcolor="black" width="92%">
<tbody style="text-align: center;">
<tr id="header" width="100%" height="64">
<td width="25%"><img src="../assets/logo.jpg"></td>
<td width="50%"><img src="../assets/header1.jpg">   <img src="../assets/header3.jpg">  <img src="../assets/header6.jpg">  <img src="../assets/header7.jpg">  <img src="../assets/header4.jpg">  <img src="../assets/header5.jpg">
</td>
<td width="25%"><img src="../assets/peaceful.jpg"></td>

</tr>
</tbody>
</table></div>

 

is that not from your header.php?

 

edit: and I'm getting a 404 on http:// apeacefulpride dot com /assets /logo dot jpg so I assume the trouble might be a wrong path

Link to comment
https://forums.phpfreaks.com/topic/122056--/#findComment-630081
Share on other sites

that is from header.php... i don't know why I'm getting a 404 error with logo.jpg. I have the folder and the files set to 755... that is correct right?

 

the path is correct. i have 2 subfolders... "assets" and "sites" all the php is in "sites" and all my media is in "assets" ... and I do  have all those images in my assets folder... I'm stumped

Link to comment
https://forums.phpfreaks.com/topic/122056--/#findComment-630085
Share on other sites

well if it were a matter of permissions it would say something like access denied but 404 means it's not found at all so either the path or the file itself is not being recognized.  Perhaps on your server it is logo.JPG instead of .jpg?

 

edit:

 

actually I'm getting a 404 even just trying ../assets/ with no filename so for some reason it's not recognizing your folder

Link to comment
https://forums.phpfreaks.com/topic/122056--/#findComment-630089
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.