Including PHP files
Posted: Thu Jul 07, 2011 12:17 am
Dear Members
I am new to PHP. I design static pages using HTML. I am creating a PHP site. I have created two files as follows.
Header.PHP
<!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" />
<title>Untitled Document</title>
<link href=../CSS/Headerstyles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="1">
<tr>
<td class="headerbackground"><a href="#" class="headerlink">Home</a></td>
</tr>
</table>
</body>
</html>
Home PHP
<!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" />
<title>Untitled Document</title>
</head>
<? php include ('Header.PHP');?>
<body>
<table width="100%" border="1">
<tr>
<td > </td>
</tr>
</table>
</body>
</html>
The above code done for including the Header.php file in the Home.php file is working in design time but not on runtime. Please suggest
Thanks in advance
I am new to PHP. I design static pages using HTML. I am creating a PHP site. I have created two files as follows.
Header.PHP
<!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" />
<title>Untitled Document</title>
<link href=../CSS/Headerstyles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="1">
<tr>
<td class="headerbackground"><a href="#" class="headerlink">Home</a></td>
</tr>
</table>
</body>
</html>
Home PHP
<!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" />
<title>Untitled Document</title>
</head>
<? php include ('Header.PHP');?>
<body>
<table width="100%" border="1">
<tr>
<td > </td>
</tr>
</table>
</body>
</html>
The above code done for including the Header.php file in the Home.php file is working in design time but not on runtime. Please suggest
Thanks in advance