I've tried finding an answer for this but to no avail. Maybe it's just too basic.
I've decided to finally learn some basic php to use with my website. The dynamic bits of the website I want are:
1) Header
2) Side menu
3) Footer.
So, VERY basic. Now, when I enter what I consider the most basic code into Dreamweaver MX 2004, it gives me the yellow code warning saying I'm wrong. I haven't even started with the sidebar yet! This is what the three files contain:
Header File
Content File
Footer File
Now that is EXACTLY what the files contain. The yellow error comes up in regards to the footer code. If I use the readfile command, it's happy but if I use include or require I get told my code is bad.
Is it? Or is Dreamweaver wrong? If I view the page in IE, Safari or Firefox it works fine but I don't like the idea of starting off with wrong code.
I know this is the most basic of questions but I can't find an answer online that makes sense. Like I said, I just started learning!
I've decided to finally learn some basic php to use with my website. The dynamic bits of the website I want are:
1) Header
2) Side menu
3) Footer.
So, VERY basic. Now, when I enter what I consider the most basic code into Dreamweaver MX 2004, it gives me the yellow code warning saying I'm wrong. I haven't even started with the sidebar yet! This is what the three files contain:
Header File
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>This is a test page</title>
</head>
<body>
<p>This is a header</p>
Content File
Code:
<? include("header.php"); ?>
<h1>This is the first page</h1>
<? include("footer.php"); ?>
Footer File
Code:
<p>This is a footer</p>
</body>
</html>
Now that is EXACTLY what the files contain. The yellow error comes up in regards to the footer code. If I use the readfile command, it's happy but if I use include or require I get told my code is bad.
Is it? Or is Dreamweaver wrong? If I view the page in IE, Safari or Firefox it works fine but I don't like the idea of starting off with wrong code.
I know this is the most basic of questions but I can't find an answer online that makes sense. Like I said, I just started learning!