The post How enable HTML files to display php code first appeared on Web Hosting Stuff.
]]>
Enable HTML files to display php code
1) Log into your cPanel
2) Using the File Manager, navigate to the root folder for the domain you want to work with
3) Set the Show Hidden Files option as you will be working with the .htaccess file
4) If there is not one for the domain, you will need to create a new one
5) Edit the file by highlighting the file
6) Click on the Edit icon from the toolbar at the top of the page
5) This brings you to the cpanel file editor. You will want to insert the following line of code at the top of the .htaccess file.
AddType application/x-httpd-php5 .html .htm .php
6) Then, Click the Save Changes button in the upper right corner of the screen.
7) You are now able to place php code sections into your html files and have them display.
8) Look at the before and after shot to see how the code affects a page with php in it.
The post How enable HTML files to display php code first appeared on Web Hosting Stuff.
]]>