Re: php doesn't work in html files
| From: | MadHD | Date: | Sun, 11 Jan 2004 13:44:14 +0000 |
| Subject: | Re: php doesn't work in html files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174238@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Nico Berg"
To: "'PHP General'"
Sent: Sunday, January 11, 2004 2:04 PM
Subject: [PHP] php doesn't work in html files
> Hi there all,
>
> I use Apache version 1.3 and WIndows 2000. The site is not global but only
> local so I use the url http://localhost/index.html
>
> This index.html look's like this:
>
> <html>
> <body>
> This is a line
> </body>
> </html>
>
> <?
> echo "this is the second line";
> ?>
>
> Output is: This is a line
>
> So the php part is not done at all. Is that right? I always believed php
> should work in html?
Try to rename the .html file in .php (index.html -> index.php) and test it.
You can reconfigure apache to pass all .html files to php compiler but i
don't recommend it because it reduce drastically the performance.
Heber