11-24-2009, 11:22 AM
As you know that php and html are quite different from each other. You may enter html codes inside the .php file BUT you can't do such within .html files , i.e., you are unable to write php codes inside .html files.
Here I am sharing you a simple trick to write php codes inside any .html files of your website
Create a blank file and call it .htaccess, you will need to upload this file on your server in the directory where you want to have .html pages containing php code or you can also place the .htaccess file in your site root, the settings inside it will apply to all its sub directories.
Now write the following code inside your .htaccess file and save it:
And you are done ! Now write any php codes inside .html files and the server side language (I mean php) will function correctly.
Enjoy this tip
This tip is shared by zone for www.supportforums.net . If you want to share this, you are free to do so, but please give credit to me.
Thankyou very much and be happy
Here I am sharing you a simple trick to write php codes inside any .html files of your website
Create a blank file and call it .htaccess, you will need to upload this file on your server in the directory where you want to have .html pages containing php code or you can also place the .htaccess file in your site root, the settings inside it will apply to all its sub directories.
Now write the following code inside your .htaccess file and save it:
Code:
AddType application/x-httpd-php .html .htm .php
And you are done ! Now write any php codes inside .html files and the server side language (I mean php) will function correctly.
Enjoy this tip
This tip is shared by zone for www.supportforums.net . If you want to share this, you are free to do so, but please give credit to me.
Thankyou very much and be happy