apache 如何支持shtml

lizhengqin 2010-03-17 11:00:45
我的开发环境:windows 2003 安装的是wamp
apache 版本是:2.2.8

我在网上搜索一下,按照步骤做一来,显示空白
1 打开httpd.conf 文件,把
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

把"#"号去掉

2 在Options Indexes FollowSymLinks 后面加上Includes 保存文件

重启服务,我的tree.shtml文件内容如下
1
test all<br />
2
<!--#include file="js.html" -->
3

4
no
js.html文件和tree.shtml 文件在同一个目录下

http://localhost/myphoto/tree.shtml myphoto是虑拟目录
...全文
153 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lizhengqin 2010-03-23
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 garcon1986 的回复:]

怎么样了??问题解决了吗
[/Quote]

找到答案了, 如果我用http://localhost/tree.shtml 游览是能够看到的

http://localhost/myphoto/tree.shtml

编辑虑拟目录myphoto

Alias /myphoto/ "d:/photo/"

<Directory "d:/photo/">
Options Indexes FollowSymLinks MultiViews Includes 这里加上"Includes " 重启服务
AllowOverride all
Order allow,deny
Allow from all
</Directory>
heyli 2010-03-19
  • 打赏
  • 举报
回复
在httpd.conf中加入
<Directory /var/www/html/example>
Options Includes
AddType text/html .shtml
AddHandler server-parsed .shtml
</Directory>
example目录中的shtml文件就应当能够运行了
garcon1986 2010-03-19
  • 打赏
  • 举报
回复
怎么样了??问题解决了吗
huolin 2010-03-18
  • 打赏
  • 举报
回复
重启了没有,
不行的话,看一下apache日志
liuahuilele 2010-03-17
  • 打赏
  • 举报
回复
!!!!!!!!!!!!!d

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧