the include function
Posted: Sat Nov 19, 2011 11:59 am
im new to php and i am trying to make a simple website i.e html dynamic pages with php
everything was ok but after i divided my code into parts and put them in he includes folder on my pc
but when i start index.php i started seeing this below on my web browser ,the orignal code is below(undivided code) am i missing something?
orignal code
everything was ok but after i divided my code into parts and put them in he includes folder on my pc
but when i start index.php i started seeing this below on my web browser ,the orignal code is below(undivided code) am i missing something?
Code: Select all
<?php
include ("includes/header.html");
include ("includes/home.html");
include ("includes/navbar.html");
include ("includes/footer.html");
?>Code: Select all
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/main.css" rel="stylesheet">
<title>My testing website</title>
</head>
<body>
<div class='wrapper'>
<div class='header'></div>
<div class='navbar'>
<div class='button'><a href='index.php?page='>Home</a></div>
<div class='button'><a href='index.php?page=gallery'>Gallery</a></div>
<div class='button'><a href='index.php?page=design'>Design</a></div>
<div class='button'><a href='index.php?page=contacts'>Contacts</a></div>
<div class='button'><a href='index.php?page=about'>About</a></div>
</div>
<div class='mainbody'></div>
div class='footer'>elginin</div>
</div>
</body>
</html>