•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,548 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,519 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 887 | Replies: 2
![]() |
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
I've managed to make the use of PHP's "include" function in order to share Header, Top Menu, Left Menu, Right Menu & Footer. The only exception is the Content, since it would be unique for each individual page.
Problem is, I'm getting my "Content" displaying BELOW the "Footer", as it can be seen: http://members.lycos.co.uk/darsh25/contact.php
All the files within this website can be seen on: http://members.lycos.co.uk/darsh25/
>> "menu.inc" is the PHP's include file
>> contact.php & about.php are the files that's NOT displaying content properly (where it appears to go BELOW the "Footer").
>> contact.html OR about.html shows the desired layout (these are couple of ".html" files that I first created BEFORE the ".php" version of it, although, I'll be deleting these later on, once I get the display of my ".php" files sorted out)
All I know for the fact that it's a rather silly mistake I'm making perhaps involving putting the wrong line of code in wrong file. Can anyone help ???
Problem is, I'm getting my "Content" displaying BELOW the "Footer", as it can be seen: http://members.lycos.co.uk/darsh25/contact.php
All the files within this website can be seen on: http://members.lycos.co.uk/darsh25/
>> "menu.inc" is the PHP's include file
>> contact.php & about.php are the files that's NOT displaying content properly (where it appears to go BELOW the "Footer").
>> contact.html OR about.html shows the desired layout (these are couple of ".html" files that I first created BEFORE the ".php" version of it, although, I'll be deleting these later on, once I get the display of my ".php" files sorted out)
All I know for the fact that it's a rather silly mistake I'm making perhaps involving putting the wrong line of code in wrong file. Can anyone help ???
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
Codes for "about.php":
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Personal Website</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<?php include("menu.inc");?>
<div id="centerContent">
<p class="first-letter">This is the content for about.php.</p>
<p>
<?php
function ourMotto(){
echo "We deliver quantity, not quality!<br/>";
}
ourMotto();
?>
</p>
</div>
</html> Nope, I'm NOT God, but I'm British (which is the next best thing ;)
This is a html problem.
about.php contains the <html></html> tags which causes it to be shown at the bottom.
It actually does not matter if your included files are php or html.
They will be parsed just like php files where anything embeded between the php tags will be parsed as php.
The parent file, has to be a php file however.
about.php contains the <html></html> tags which causes it to be shown at the bottom.
It actually does not matter if your included files are php or html.
They will be parsed just like php files where anything embeded between the php tags will be parsed as php.
The parent file, has to be a php file however.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Need help with changing the index.php file (Existing Scripts)
- Can we execute command line cmds from a php file?? (PHP)
- PHP file calling html control names (PHP)
- PHP5x,Apache2.2 : Apache not reading php file (PHP)
- Get the name of the current php file (PHP)
- What is the purpose of the "lib.php" file?? (PHP)
Other Threads in the PHP Forum
- Previous Thread: Online application
- Next Thread: Shabba


Linear Mode