Knowledge Base Article

How to include PHP code in .htm/.html pages?

In order to include and execute PHP code in .htm/.html pages, you should set PHP as the default handler for these pages. You can easily do this by adding the following line to your .htaccess file:

 

AddHandler application/x-httpd-php52 .php .htm .html

 

Of course, you should make sure that your PHP code is correct and is placed between the opening <?php and the closing ?> PHP tags.



Rating

Please indicate if this article was helpful for you.

rating :  3.0 from 5
views :  299
votes :  10

Valid XHTML 1.0 Strict Valid CSS!