Well there's the error<?php include ("content.txt") ?>
<?php includes ("content.txt") ?>
not
<?php include ("content.txt") ?>
I do believe

Well there's the error<?php include ("content.txt") ?>
<?php includes ("content.txt") ?>
not
<?php include ("content.txt") ?>
I do believe
Previously a Habbo fanatic, web designer/developer, fansite owner, & trusted member of the community.
Try that.
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Box</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- body { text-align: center; background-color: #ffffff; margin-top: 5px; } #container { width: 274px; margin: auto; font-family: Verdana; font-size: 10px; font-weight: normal; color: #000000; } #top { background: url(header.png); height: 21px; } #mid { background: url(background.png); } #bot { background: url(footer.png); height: 26px; } --> </style> </head> <body> <div id="container"> <div id="top"></div> <div id="mid"><?php $midcontent = file_get_contents('content.txt'); echo $midcontent; ?></div> <div id="bot"></div> </div> </body> </html>
Very nice indeed, I'll be using this!
- Lee
Student Pilot EGBW | Cessna 152 G-BHPY G-BTVW
Passed Air Law exam April 25th
Thanks for this, it will really help as I am just a learner at coding
--
For those complaining, he has already used to code so it does work.
Lmao at happend to meh
Ive done that but when it does it the images e.g. top mid bot dont show there called the same as they are on the coding. why :SPHP Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Box</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body {
text-align: center;
background-color: #ffffff;
margin-top: 5px;
}
#container {
width: 390px;
margin: auto;
font-family: Verdana;
font-size: 10px;
font-weight: normal;
color: #000000;
}
#top {
background: url(top.gif);
height: 11px;
}
#mid {
background: url(mid.gif);
}
#bot {
background: url(bot.gif);
height: 10px;
}
-->
</style>
</head>
<body>
<div id="container">
<div id="top"></div>
<div id="mid"><?php include ("content.txt")?></div>
<div id="bot"></div>
</div>
</body>
</html>
http://www.shanes.sawhosting.com/tut
The images will have to be in the same folder as the .php document as the aboveLmao at happend to meh
Ive done that but when it does it the images e.g. top mid bot dont show there called the same as they are on the coding. why :SPHP Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Box</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body {
text-align: center;
background-color: #ffffff;
margin-top: 5px;
}
#container {
width: 390px;
margin: auto;
font-family: Verdana;
font-size: 10px;
font-weight: normal;
color: #000000;
}
#top {
background: url(top.gif);
height: 11px;
}
#mid {
background: url(mid.gif);
}
#bot {
background: url(bot.gif);
height: 10px;
}
-->
</style>
</head>
<body>
<div id="container">
<div id="top"></div>
<div id="mid"><?php include ("content.txt")?></div>
<div id="bot"></div>
</div>
</body>
</html>
http://www.shanes.sawhosting.com/tut
Want to hide these adverts? Register an account for free!