为什么我只能使用具有相对路径的 SSI?
我刚刚阅读了有关 SSI 的一些教程,并设法展示了我想要的内容,但我想使用绝对路径来指向该文件,但由于某种原因,我只能使用相对路径来完成。我做错了什么吗?
<!--#include virtual="/menubar/bar.html" -->
有效
但是当我使用时:
<!--#include virtual="http://chusmix.com/menubar/bar.html" -->
我收到此错误:[处理此指令时发生错误]
谢谢!
I just read a little tutorial on SSI and managed to show what I wantedbut I'd like to use an absolute path to point at this file, but for some reason I can only do it with a relative path. Am I doing something wrong?
<!--#include virtual="/menubar/bar.html" -->
Works
But when I use:
<!--#include virtual="http://chusmix.com/menubar/bar.html" -->
I get this error: [an error occurred while processing this directive]
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,SSI 必须引用本地文件系统路径。您尝试使用的不是绝对文件系统路径 - 它是 HTTP URL。
Typically SSIs must refer to local filesystem paths. What you are trying to use isn't an absolute filesystem path - it's an HTTP URL.