I am trying to use PHP's include function in conjunction with html but it is not working. I'm just messing around with the tag, it seems to be very simple but i cannot figure out why it is not working...
here is the template.php page:
<!DOCTYPE html>
<html>
<head>
<title>Template</title>
<link href="css/layout.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="wrapper">
<?php
include ("include/header.php");
include ("include/leftcolumn.php");
include ("include/rightcolumn.php");
include ("include/footer.php");
?>
</div>
</body>
</html>
and here is the header.php page that I am trying to include:
<header>
<p>Header.</p>
</header>
The only thing i could think of is the wrong directory, I have an include folder which is where the header.php is and referenced that in the include tag...unless I'm wrong, any tips? Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…