Dev Dev - 7 months ago 26
HTML Question

How can I run an php code inside html (test.html) file?

How do I display PHP code in HTML? If this can be done by using .htaccess file,
01 can I use it on local server (like wamp) ?
02 can anyone provide a sample .htaccess file for this task ?


You can run PHP with any extension you want. With Apache, you can simply add the following to your .htaccess

Addhandler application/x-httpd-php .html .php .whatever