日期:2014-05-17  浏览次数:20667 次

如何让apache支持.shtml 让apache支持include标签

如何让apache支持.shtml 让apache支持include标签

第一步,修改httpd.conf文件中,增加文件后缀
AddType ? text/html ? .shtml?? .html

AddOutputFilter INCLUDES .shtml .html
AddHandler ? server-parsed ? .shtml .html

第二步:继续修改,增加options属性

? <Directory ? /> ?
? ? ? ? ? Options ? FollowSymLinks ? MultiViews ? Includes ?
? ? ? ? ? AllowOverride ? None ?
? ? ? ? ? Allow ? from ? all ?
? </Directory>??

?

然后搜索“Options Indexes FollowSymLinks” 【一定要找到你自己项目运行的目录】
在搜索到的那一行后面添加“ Includes”
即将该行改变为 Options Indexes FollowSymLinks Includes

重启即可

?

包含用法:

?

<!--#include file="sinykk.shtml"-->