Page 1 of 1

Embed php code in html file

Posted: Wed Nov 19, 2014 9:17 am
by not logged in
Is it possible to run php code within .html files on Sonic.net?

Re: Embed php code in html file

Posted: Thu Nov 20, 2014 9:38 am
by thulsa_doom
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.