Embed php code in html file

Web hosting discussion, programming, and shared and dedicated servers.
2 posts Page 1 of 1
by not logged in » Wed Nov 19, 2014 9:17 am
Is it possible to run php code within .html files on Sonic.net?
by thulsa_doom » Thu Nov 20, 2014 9:38 am
Sounds like a job for .htaccess!

Code: Select all

AddHandler php-script .html
Basically you create a file named ".htaccess" containing the above text followed by an empty line. Put it in the directory where you want our server to treat .html files as PHP scripts.
John Fitzgerald
Sonic Technical Support
2 posts Page 1 of 1