Table of Contents
Q. Can I use a PHP tag in my html page? #
Ans. Yes, you can use the PHP tag within html pages. All you have to do is to embed PHP with html in your apache configuration and add modules which will execute the php code in your html pages. Our support will help you if you are unable to make these changes from your end or if you have a shared hosting account.
For those who have dedicated servers or VPS accounts can do this in the “AddHandler” section of httpd.conf
Simply add following line in AddHandler :-
AddType application/x-httpd-php .html
After adding it the addhandler section would look like this :-
AddType application/x-httpd-php .php AddType application/x-httpd-php .php4 AddType application/x-httpd-php .php3 AddType application/x-httpd-php .html AddType application/x-httpd-php-source .phps AddType application/x-httpd-php .phtml AddHandler cgi-script .cgi .pl AddType text/html .shtml AddType application/x-tar .tgz AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbmp .wbmp AddType text/vnd.wap.wmlscript .wmls AddType application/vnd.wap.wmlc .wmlc AddType application/vnd.wap.wmlscriptc .wmlsc