306 TD Slut
Am i doing this right? i preview it locally on my machine and it doesnt show the header.php at the top but if i upload it to my space online it does..
heres the index.php code:
(i know the css is in the document and not linked in, just playing about and couldnt be arsed to do it properly)
here is the header code:
both files are saved as .php too.
am i missing something out?
thanks
heres the index.php code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP Include Test</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
font-size: 0.8em;
color: #999999;
text-align: center;
}
#header {
width: 700px;
position: relative;
height: 80px;
}
#content {
background-color: #CCCCCC;
width: 700px;
position: relative;
height: 500px;
}
#wrapper {
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
height: auto;
width: 700px;
position: relative;
}
#footer {
width: 700px;
position: relative;
height: 80px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<?php include("header.php"); ?>
<div id="content"></div>
<div id="footer"></div>
</div>
</body>
</html>
(i know the css is in the document and not linked in, just playing about and couldnt be arsed to do it properly)
here is the header code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
</title>
<style type="text/css">
<!--
p {
font-size: 0.8ems;
color: #CCCCCC;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
#header {
background-color: #993333;
height: 80px;
width: 700px;
position: relative;
}
-->
</style>
</head>
<body>
<div id="header">
<p>welcome to php include test blah blah blah blah blah</p>
</div>
</body>
</html>
both files are saved as .php too.
am i missing something out?
thanks