A few years ago, I was still working in HTML, i had to update every page when there was a new link etc. Until I found the power of PHP. But, google had listed all my pages as page.html for php to work, i had to change it to .php.
If you were like me, and need to use php in .html pages, we have a solution.
This will probably not work if you don't use Apache.
Open up .htaccess in your site’s root folder. If it doesn’t exist, open up Notepad.
Add this to the file
- Code: Select all
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Then save it as .htaccess and you are now ready to use php in html pages.
This work is licensed under a Creative Commons License