+ -
当前位置:首页 → 问答吧 → php apache支持shtml 文件 php支持ssi语句

php apache支持shtml 文件 php支持ssi语句

时间:2011-04-08

来源:互联网

转:say0507

php apache支持shtml 文件 php支持ssi语句





Apache默认是不支持SSI的,需要更改httpd.conf来进行配置。

打开conf目录下的httpd.conf文件,搜索“AddType text/html .shtml”,搜索结果:


# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml


把这两行前面的#去掉。


然后搜索“Options Indexes FollowSymLinks”
在后面添加“ Includes”
即将该行改变为 Options Indexes FollowSymLinks Includes

如果让php也支持SSI语句,可以后面加上一行,AddOutputFilter Includes  .php,如下
  1. <Directory />

  2.   Options Indexes FollowSymLinks Includes

  3.   AllowOverride None

  4.   AddOutputFilter Includes  .php

  5. </Directory>
复制代码
保存后,重起apache即可。

作者: so_brave   发布时间: 2011-04-08

php就没必要支持ssi了,可用readfile之类函数

作者: ashchen   发布时间: 2011-04-08

热门下载

更多