为什么只能将SSI与相对路径一起使用? [英] Why can I only use SSI with relative path?

查看:186
本文介绍了为什么只能将SSI与相对路径一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚阅读了一些有关SSI的教程,并设法显示了我想要的内容,但是我想使用绝对路径指向该文件,但是由于某些原因,我只能使用相对路径来做到这一点.我在做错什么吗?

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" -->

作品

但是当我使用时:

<!--#include virtual="http://chusmix.com/menubar/bar.html" -->

我收到此错误:[处理此指令时发生错误]

I get this error: [an error occurred while processing this directive]

谢谢!

推荐答案

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

这篇关于为什么只能将SSI与相对路径一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆