user1469734
user1469734

Reputation: 801

absolute path to file in classic asp using

how to use absolute paths with classic asp? at the moment the whole application has the following includes of files:

<!--#include file="../../../../../something.asp"--> 

It doesn't work if I do a absolute call to the asp file like:

<!--#include file="/root/foobar/something.asp"-->

Someone knows a trick to let it work?

Upvotes: 4

Views: 3718

Answers (2)

webaware
webaware

Reputation: 2841

Use virtual paths, which are based off the website root:

<!--#include virtual="/something.asp"-->

Upvotes: 2

WilliamK
WilliamK

Reputation: 783

The first example will work if the site settings are changed in IIS to "Allow parent paths".

The second sample is not acceptible, at least not on Windows servers.

Upvotes: 0

Related Questions