开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜