thecryoflove Posted August 31, 2008 Share Posted August 31, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/122056--/ Share on other sites More sharing options...
.josh Posted August 31, 2008 Share Posted August 31, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/122056--/#findComment-630081 Share on other sites More sharing options...
thecryoflove Posted August 31, 2008 Author Share Posted August 31, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/122056--/#findComment-630085 Share on other sites More sharing options...
.josh Posted August 31, 2008 Share Posted August 31, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/122056--/#findComment-630089 Share on other sites More sharing options...
JREAM Posted August 31, 2008 Share Posted August 31, 2008 just to test, you could try this: <img src="<?php echo $_SERVER['DOCUMENT_ROOT'] . '/assets/logo.jpg'; ?>"> Quote Link to comment https://forums.phpfreaks.com/topic/122056--/#findComment-630114 Share on other sites More sharing options...
JREAM Posted August 31, 2008 Share Posted August 31, 2008 if you want to do it all over in subfolders you could do a function also: <?php function sinc($place){ $server = $_SERVER['DOCUMENT_ROOT']; include($server . '/' . $place); } ?> <?php sinc('header.php');?> Quote Link to comment https://forums.phpfreaks.com/topic/122056--/#findComment-630116 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.