为什么我只能使用具有相对路径的 SSI?

发布于 2024-11-03 05:09:21 字数 324 浏览 12 评论 0原文

我刚刚阅读了有关 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

说好的呢 2024-11-10 05:09:21

通常,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文