Dev Dev - 1 year ago 99
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 Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download