包括网站外的文件 [英] include file outside web site

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

问题描述

是否可以在网站外部放置一个包含文件

父文件夹?

例如,假设您有几个网站

Inetpub / global / websites /但包含文件在Inetpub / inc /

我得到一个文件未找到错误尝试文件/虚拟从root开始和

甚至使用C:/ Inetpub。


示例


Inetpub / global / websites / website1 / global.asa


在global.asa中是声明


< - Include file =" C:/inetpub/inc/functions.inc" - > ;


谢谢,

史蒂夫

Is it possible to have an include file that resides outside of the web site
parent folder?
For instance, lets say you have several websites under
Inetpub/global/websites/ but the include file is in Inetpub/inc/
I get a file not found error trying file/virtual starting with the root and
even using C:/Inetpub.

Example

Inetpub/global/websites/website1/global.asa

Inside global.asa is the statement

<--Include file="C:/inetpub/inc/functions.inc"-->

Thanks,
Steve

推荐答案

SteveT写道:
SteveT wrote:

是否可以在

网站父文件夹之外放置一个包含文件?

例如,假设你有几个网站

Inetpub / global / websites /但是包含文件是在Inetpub / inc /

我得到一个文件未找到错误尝试文件/虚拟开始使用

root甚至使用C:/ Inetpub。


示例


Inetpub / global / websites / website1 / global.asa


在global.asa内部是声明

< - 包含文件=" C:/inetpub/inc/functions.inc" - >


谢谢,

Steve
Is it possible to have an include file that resides outside of the
web site parent folder?
For instance, lets say you have several websites under
Inetpub/global/websites/ but the include file is in Inetpub/inc/
I get a file not found error trying file/virtual starting with the
root and even using C:/Inetpub.

Example

Inetpub/global/websites/website1/global.asa

Inside global.asa is the statement

<--Include file="C:/inetpub/inc/functions.inc"-->

Thanks,
Steve



是的,我想是这样的


我在我的网站上有这个(见签名)

< ;! - #include file =" _fpclass / guestbook.inc" - >

从父文件夹中的guestbook.asp调用它

我假设您还可以使用

(例如)../foldername/filename.inc

$ b $在文件夹结构中上下导航b从Inetpub / global / websites / website1 / global.asa,你必须上涨

三(到Inetpub /)然后下到inc /。


所以我会尝试:

<! - #include file =" ../../../ inc / fun ctions.inc - >


-

干杯,

Trevor L.

[微软MVP - FrontPage]

MVPS网站: http:// trevorl .mvps.org /

--------------------------------- -------

Yes, I think so

I have this in my site (see signature)
<!--#include file="_fpclass/guestbook.inc"-->
It is called from guestbook.asp in the parent folder

I assume that you can also navigate up and down the folder structure using
(for example) ../foldername/filename.inc

From Inetpub/global/websites/website1/global.asa, you would have to go up
three (to Inetpub/) then down to inc/.

So I would try:
<!--#include file="../../../inc/functions.inc"-->

--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------


" SteveT"写道:
"SteveT" wrote:

是否有可能在网站父文件夹之外有一个包含文件?

Is it possible to have an include file that resides outside of
the web site parent folder?



启用父路径后,您可以到同一驱动器的根目录,

,前提是您使用这种类型的路径:


<! - #include file =" ../../../ path1 / path2 / filename.ext" - >


-

戴夫安德森


未经请求的商业电子邮件将以

With parent paths enabled, you can go as far as the root of the same drive,
provided you use this type of path:

<!-- #include file="../../../path1/path2/filename.ext" -->

--
Dave Anderson

Unsolicited commercial email will be read at a cost of


每条消息500条。使用

此电子邮件地址表示同意这些条款。

500 per message. Use
of this email address implies consent to these terms.


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

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