wamp ssi 不工作
我正在与 wamp 合作。我想使用 ssi,所以我更改了 httpd.conf 中的以下行,但它似乎不起作用:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options +Includes
test.html
<html>
<title>This is incl html</title>
<!--#include file="menu.shtml" -->
</html>
menu.shtml
<h1>hheelloo</h1>
我缺少什么?
i am working with wamp. i want to use ssi so i have changed following lines in httpd.conf but it does not seem to be working :
AddType text/html .shtml
AddHandler server-parsed .shtml
Options +Includes
test.html
<html>
<title>This is incl html</title>
<!--#include file="menu.shtml" -->
</html>
menu.shtml
<h1>hheelloo</h1>
What am i missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将包含以下内容的 .htaccess 文件添加到项目根目录中。
这应该允许包含在该项目上工作。
Add to your projects root directory a .htaccess files with the following.
This should allow includes to work on that project.
我遇到了同样的问题,直到找到此链接 -
http://www.roseindia.net/tutorial/php/phpbasics/Setting-Up-SSI-On-Wamp.html
答案的要点如下。似乎需要将这些行添加到文件中的特定位置。他们还建议寻找并解决问题。替换 FollowSymLinks 选项 -
遵循这些步骤对我有用。
I was experiencing this same problem until I found this link -
http://www.roseindia.net/tutorial/php/phpbasics/Setting-Up-SSI-On-Wamp.html
The gist of the answer is below. It seems the lines need to be added in a specific location within the file. They also suggested a find & replace on the FollowSymLinks option -
Following these steps worked for me.
我认为这可能会起作用,而不是 < !--#include 文件:
我的 AddType text/html .shtml 行下也有这个:
仅供参考,我不是专家,我只是查看了我自己的服务器是如何设置的。我希望它有帮助
I think this might work instead of < !--#include file:
I also have this under my AddType text/html .shtml line:
fyi I'm not an expert, I just looked at how my own server is set up. I hope it helps