Parsing php with html extension

2 posts / 0 new
Last post
#1 Thu, 01/08/2009 - 07:00
Radster

Parsing php with html extension

Can anyone on here tell me how this would be possible within a virtualmin / Ubuntu 8.04 enviroment searced the internet found a few instruction but not seemed to work.

i want to be able to use the <?Php include> feature on a html page, Im not able to change the html extension to php as this is a template file.

Ive added

RemoveHandler .html .htm AddType application/x-httpd-php .html .htm

to the .conf file but made no difference also added this to the htaccess file again no difference can anyone point me in the right direction.

EDIT:

its ok it does work just no how i want can anyone tell me how to enable server side includes<br><br>Post edited by: Radster, at: 2009/01/08 07:52

Thu, 01/08/2009 - 10:26
andreychek

Someone on my server here is doing exactly that -- they added this to their .htaccess file:

AddType application/x-httpd-php .htm .html

And then, in their HTML, they have:

&lt;?php include &quot;foo.php&quot; ;?&gt;

So you do still need to wrap it in &quot;php&quot; tags, but that should work for you if you're doing so.
-Eric

Topic locked