Execute PHP code in .html file

April 27, 2011 | In: PHP

Only way to

execute PHP code on a .html

page is to modify your .htaccess file. This file may be hidden, so depending upon your FTP program you may have to modify some settings to see it. Then you just need to add this line for .html file

AddType application/x-httpd-php .html

Or for .htm file

AddType application/x-httpd-php .htm

If you only plan on including the PHP on one page, it is better to setup this way:

<Files yourpage.html>
AddType application/x-httpd-php .html
</Files>

This code will only make the PHP executable on the yourpage.html file, and not on all of your html pages.

Comments

comments

Related Posts



1 Response to iDeal Payment Integration

Avatar

greece escorts

January 27th, 2013 at 2:53 am

It is actually a great and useful piece of information. I am glad that you just shared this helpful info with us. Please stay us informed like this. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories