How do I allow parsing of PHP scripts in .html pages in H-Sphere?
How do I allow parsing of PHP scripts in .html pages? I've tried Web Options>Web Service>Settings.. and added ".html" to the list. But now my .html pages display the source code rather than displaying the html and parsing the php scripts. Please help? Changing the filenames to ".php" is too cumbersome, have to update all links. Thanks.
Public Comments
- are you sure that you have used the correct tags to start and end php blocks. Have you also checked the make sure that your host does offer php? If yes toboth questions above then you will have to change the filenames unfortunately.
- Open a new Notepad file. Paste below code in it AddType text/x-server-parsed-html .html Now save the file as ".htacess" (note: You have to give a dot before name of the file .. its .htacess Do not give any extension to this file... While saving file..put double commas and write the .htacess name inside comma. Close the commas. It should look exactly like ".htacess" Upload this file along with your other files to your server. If your server is new, the html files will support php code with extension .html Hope this helps
Powered by Yahoo! Answers