SSI:文件路径 [英] SSI: path to file

查看:104
本文介绍了SSI:文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个网站,其中在所有html文件中我都有一个SSI指令,

因此:


<! - # include file =" nav.html" - >


但是如果我从webiste中的子目录中的html文件调用相同的文件,那么:


<! - #include file =" ../ nav.html" - >


它不会工作,我得到了这个错误:


[处理此指令时出错]


会感激任何建议..谢谢..


弗朗西丝

解决方案

凝视我的水晶球我观察了Frances Del Rio< fd *** @ yahoo.com>

写新闻:39 ************* @ individual.net:

我'我正在建立一个网站,在所有html文件中我都有一个SSI指令,
因此:

<! - #include file =" nav.html" - >

但如果我从sub-di中的html文件中调用相同的文件r在网站上,因此:

<! - #include file =" ../ nav.html" - >

它不会工作,我收到这个错误:

[处理此指令时出错]

会感激任何建议..谢谢..

Frances




<! - #include virtual =" ../ nav.html" - >


-

Adrienne Boswell
http://www.cavalcade-of-coding.info

请回复小组以便其他人分享


Adrienne写道:

凝视我的水晶球,我观察了Frances Del Rio< fd *** @ yahoo.com>
写新闻:39 ****** *******@individual.net:

我正在做一个网站,在所有html文件中我都有一个SSI指令,
因此:

<! - #include file = " nav.html" - >

但是如果我从网站中的子目录中的html文件中调用相同的文件,那么:

<! - - #include file =" ../ nav.html" - >

它不起作用,我收到此错误:

[发生错误在处理此指令时]

会感激任何建议..谢谢..

Frances

<! - #include virtual =" ; ../ nav.html" - >




哦我的天哪 - 我不知道..所以任何时候你用SSI调用文件

指令'与指令所在的文件不在同一个目录中

使用''virtual''而不是''file''....有趣的.....非常感谢

很快得到回复... Frances







Frances Del Rio写道:

Adrienne写道:

凝视我的水晶球我观察了Frances Del Rio
< fd *** @ yahoo.com>写新闻:39 ************* @ individual.net:

我正在做一个网站html文件我有一个SSI
指令,因此:

<! - #include file =" nav.html" - >

但是如果我从网站的子目录中的html文件中调用相同的文件,那么:

<! - #include file =" ../ nav.html" - >

它不会工作,我得到这个错误:

[处理此指令时出错]

会感激任何建议..谢谢..

Frances



<! - #include virtual =" ../ nav.html" - > ;



哦我的天哪 - 我不知道..所以任何时候你用一个SSI
指令调用一个文件'与文件不在同一目录指令是你必须使用''虚拟'而不是''文件''.....有趣.....非常感谢你很快回复... Frances < /集团kquote>


实际上.......它不是很有效..文件中的图像被称为

w / SSI指令('' images / img.gif'')不要出现..在这个文件中

图像显示我要放''../ images / img.gif''这个是这样的。

奇怪..我想我必须为这个目录做一个单独的文件

all ...无论如何再次感谢.. Frances


I''m doing a website in which in all html files I have an SSI directive,
thus:

<!--#include file="nav.html"-->

but if I call same file from an html file in a sub-dir in webiste, thus:

<!--#include file="../nav.html"-->

it won''t work, I get this error:

[an error occurred while processing this directive]

would appreciate any suggestions.. thank you..

Frances

解决方案

Gazing into my crystal ball I observed Frances Del Rio <fd***@yahoo.com>
writing in news:39*************@individual.net:

I''m doing a website in which in all html files I have an SSI directive,
thus:

<!--#include file="nav.html"-->

but if I call same file from an html file in a sub-dir in webiste, thus:

<!--#include file="../nav.html"-->

it won''t work, I get this error:

[an error occurred while processing this directive]

would appreciate any suggestions.. thank you..

Frances



<!--#include virtual="../nav.html"-->

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


Adrienne wrote:

Gazing into my crystal ball I observed Frances Del Rio <fd***@yahoo.com>
writing in news:39*************@individual.net:

I''m doing a website in which in all html files I have an SSI directive,
thus:

<!--#include file="nav.html"-->

but if I call same file from an html file in a sub-dir in webiste, thus:

<!--#include file="../nav.html"-->

it won''t work, I get this error:

[an error occurred while processing this directive]

would appreciate any suggestions.. thank you..

Frances

<!--#include virtual="../nav.html"-->



oh my gosh -- I had no idea.. so any time you call a file w/an SSI
directive that''s not in same dir as file where directive is you have to
use ''virtual'' instead of ''file''..... interesting..... thank you very
much for prompt response... Frances






Frances Del Rio wrote:

Adrienne wrote:

Gazing into my crystal ball I observed Frances Del Rio
<fd***@yahoo.com> writing in news:39*************@individual.net:

I''m doing a website in which in all html files I have an SSI
directive, thus:

<!--#include file="nav.html"-->

but if I call same file from an html file in a sub-dir in webiste, thus:

<!--#include file="../nav.html"-->

it won''t work, I get this error:

[an error occurred while processing this directive]

would appreciate any suggestions.. thank you..

Frances


<!--#include virtual="../nav.html"-->


oh my gosh -- I had no idea.. so any time you call a file w/an SSI
directive that''s not in same dir as file where directive is you have to
use ''virtual'' instead of ''file''..... interesting..... thank you very
much for prompt response... Frances



actually....... it doesn''t quite work.. images in file being called
w/SSI directive (''images/img.gif'') don''t show up.. in this file for
images to show up I would have to put ''../images/img.gif'' this is so
weird.. I think I will have to do a separate file for this dir after
all... at any rate thanks again.. Frances


这篇关于SSI:文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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