虚拟包括不工作 [英] Virtual include not working

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

问题描述

我最近接管了写在经典的ASP网站,我已经没有previous经验。

I have recently taken over a website written in Classic ASP which i had no previous experience with.

在Default.asp的有包括站点的根目录:

In the root of the site the default.asp has an include:

#include virtual="/inc/common.asp"

然而,Web服务器或本地托管时(IIS),它与说,包括文件'common.asp返回错误无法被发现。该文件夹INC存在于同一目录中的Default.asp和common.asp在INC文件夹中。

However when hosted on the web server or locally (IIS) it returns with an error which says the include file 'common.asp' could not be found. The inc folder exists in the same directory as the default.asp and the common.asp is in the inc folder.

任何帮助将是AP preciated!

Any help would be appreciated!

推荐答案

您说的INC文件夹是在同一文件夹中的default.asp - 但你如果此文件夹的根不说。虚拟的#include从需要根目录的路径,因此请确保您有完整的路径在那里。

You say that the inc folder is in the same folder as default.asp - however you don't say if this folder is root. #include virtual takes a path from root, so ensure that you have the full path in there.

在这里有语法的#include一个快速的解释: http://www.w3schools.com/ ASP / asp_incfiles.asp

There's a quick explanation of #include syntax here: http://www.w3schools.com/asp/asp_incfiles.asp

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

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