Hello,
I bought a book entitled "Web Development Solutions by" Heilmann and Francis. It is a "how to" book for web development (obviously). Chapter 1 goes throught some simple code for basic web development and uses a simple PHP command to display content. The entire code is below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Meeting Agenda for Friday, 30.07.2006</title>
<link rel="stylesheet" type="text/css" href="meetingagenda.css" />
</head>
<body>
<h1>Meeting Agenda</h1>
<h2>What to do with web standards</h2>
<p>On Friday, the following attendees will meet to discuss the importance of standardization of web communication:</p>
<ul>
<li id="chairman">Tim Berners-Lee</li>
<li>Linus Torvalds</li>
<li>Tantek Celik</li>
<?php if (isset ( $_Get['commercial' ])) {?>
<li class="commercial">Bill Gates</li>
<li class="commercial">Steve Jobs</li>
<?php } ?>
</ul>
<?php echo '<p id="footer">© Awsomemeetings.com 2006, Last Modified:' . date ('F d Y H:i:s .', getlastmod()) . '</p>' ?>
</body>
</html>
When this file is saved as a .html file, I can view it in my browser and everything is working correctly except the PHP line. When I save this file as a .php file, the source code is displayed. According to the book, this should not be happening, the "echp" command should be showing the date last modified.
I am VERY new to web development and am totally lost at this point. Can anyone help me please?
I bought a book entitled "Web Development Solutions by" Heilmann and Francis. It is a "how to" book for web development (obviously). Chapter 1 goes throught some simple code for basic web development and uses a simple PHP command to display content. The entire code is below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Meeting Agenda for Friday, 30.07.2006</title>
<link rel="stylesheet" type="text/css" href="meetingagenda.css" />
</head>
<body>
<h1>Meeting Agenda</h1>
<h2>What to do with web standards</h2>
<p>On Friday, the following attendees will meet to discuss the importance of standardization of web communication:</p>
<ul>
<li id="chairman">Tim Berners-Lee</li>
<li>Linus Torvalds</li>
<li>Tantek Celik</li>
<?php if (isset ( $_Get['commercial' ])) {?>
<li class="commercial">Bill Gates</li>
<li class="commercial">Steve Jobs</li>
<?php } ?>
</ul>
<?php echo '<p id="footer">© Awsomemeetings.com 2006, Last Modified:' . date ('F d Y H:i:s .', getlastmod()) . '</p>' ?>
</body>
</html>
When this file is saved as a .html file, I can view it in my browser and everything is working correctly except the PHP line. When I save this file as a .php file, the source code is displayed. According to the book, this should not be happening, the "echp" command should be showing the date last modified.
I am VERY new to web development and am totally lost at this point. Can anyone help me please?