Dev Dev - 4 months ago 16
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 ?

Answer

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
Comments