Have an issue using .htaccess to change HTML to PHP
I have a site with loads of html files but some of them require little PHP functions. I have heard that .htaccess can handle this and I tried the code below ...
RemoveHandler .html .htm
AddType application/x-开发者_运维百科httpd-php .php .htm .html
... but when I do this if I open an page it asks me to download the .PHP file
This suggests that you do not have mod_php installed or enabled.
The web server needs to know how to handle PHP as well as what files you want it to handle as PHP.
精彩评论