I have created a file in Dreamweaver that is going to be a header include, as follows:
<?php
// Di's Soft Furnishings
// header.html
// The header file
ob_start();
session_start();
if (!isset($page_title))
{
$page_title = 'Di\'s soft Furnishings';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $page_title; ?></title>
</head>
<body>
<?php
echo '<p>hello</p>';
?>
</body>
</html>I saved it as header.html and run it through local host (XAMPP). It displayed the ';?> after the hello. I then save the same code as header.php and run it through local host and it was perfect.
Question: Does it matter if I save a file as html or php? I also understood that php could be placed within html OK. It doesn't seem to be the case here.
Thanks for any help.
Paul











