Re: PHP-Yes, HTML-No --- Why?
- From: Barry <b@xxxxx>
- Date: Wed, 25 Jan 2006 12:30:41 +0200
Lennart Björk wrote:
Hi All,
I have a tiny program:
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>MyTitle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
</head>
<body>
<?php $host = $_SERVER['HTTP_HOST']; $server = strtolower($host);
echo 'My variables<bg>';
echo("<br>Host: $host"); echo("<br>Server: $server");
?> </body> </html>
I upload it to my webserver as test.html and as test.php. Then I test them in my webbrowser. The test.html does not work, but the test.php does. Can someone tell me why?
Because only .php files get interpreted. (Well assuming you've got a standard web server configuration)
test.html just gets printed out right?
Regards, Barry
Very confused Lennart Björk
.
- Follow-Ups:
- Re: PHP-Yes, HTML-No --- Why?
- From: Lennart Björk
- Re: PHP-Yes, HTML-No --- Why?
- References:
- PHP-Yes, HTML-No --- Why?
- From: Lennart Björk
- PHP-Yes, HTML-No --- Why?
- Prev by Date: PHP-Yes, HTML-No --- Why?
- Next by Date: Re: PHP-Yes, HTML-No --- Why?
- Previous by thread: PHP-Yes, HTML-No --- Why?
- Next by thread: Re: PHP-Yes, HTML-No --- Why?
- Index(es):
Relevant Pages
|