You are here: Re: PHP-Yes, HTML-No --- Why? « PHP Programming Language « IT news, forums, messages
Re: PHP-Yes, HTML-No --- Why?

Posted by Barry on 01/25/06 12:30

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация