六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 134|回复: 0

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

[复制链接]

升级  14.67%

70

主题

70

主题

70

主题

举人

Rank: 3Rank: 3

积分
244
 楼主| 发表于 2013-2-7 19:10:54 | 显示全部楼层 |阅读模式
如何让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"-->
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表