Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Include Virtual/File
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Include Virtual/File

 Post Reply Post Reply Page  <123>
Author
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 3:06pm
i believe michael's post above tells you how to use the system you require


Originally posted by michael michael wrote:

If you have something like
webfolder/site1.com/page.asp
and
webfolder/site2.com/otherpage.asp
where a domain maps to each .com folder... say you want to include otherpage.asp in page.asp you could do 2 things:
<!--#include virtual="../site2.com/otherpage.asp"-->
or use File pretty much the same way, though it is relative to the calling file not the root.
Back to Top
vtech View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote vtech Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 5:55pm
So do if the other folder is called Todd for example it would be

../todd/file.ext ?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 6:08pm
yes , i think thats right.

you can only test itLOL.

if michael is correct (bet he is)... it should be fine.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 9:04pm
It's all theory man. basically with virtual you start at the root of your web so you do a .. to go up a level then you do /yourdirectory to go into the other site... it may looks something like ../../folder/file.ext if it's further up.
Back to Top
vtech View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote vtech Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2005 at 6:44am
I tried and i am getting 

Active Server Pages error 'ASP 0126'

Include file not found

/test.asp, line 1

The include file '../SkyCrest0root/stats.htm' was not found.

The code i used was
<!--#include virtual="../SkyCrest0root/stats.htm"-->
and the page is there also.
 
Is there another way of doing this like by using the FSO to include it or something?
Back to Top
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Post Options Post Options   Thanks (0) Thanks(0)   Quote xeerex Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2005 at 9:50am
You could use FSO to copy the file from one web root to the other each time a page is called. I'm not sure how much overhead this would add but it shouldn't be much. Then you would only have to worry about updating content in one website as the 2nd would use FSO to copy the correct file in. The only other consideration would be if you were copying an ASP page in that had includes or code that was dependent on other files.

Although I'm not positive, I think the include statements can only be used within a defined website. Using "include file", you can look above root in a defined site, but "include virtual" will only look below the root of the site.
Back to Top
vtech View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote vtech Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2005 at 1:53pm
Okay, maybe if i explain a little more on what i am trying to do someone can tell me a workaround then.
 
For a website i am hosting i have 2 root folders, one has all the asp code and the site pretty much in it the other i want to use so that when the people logged in create pages for the site it stores all the pages on the other root folder.
 
SO in other words i dont want to mix the site with the content so i am putting it on a different directory.
 
 
All help is appreciated
Vtech
Back to Top
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Post Options Post Options   Thanks (0) Thanks(0)   Quote xeerex Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2005 at 7:56pm
Sounds to me like the easiest way is to (1) use FSO to create .txt or .html files for the content or (2) Use a database to power the content, whether Access, SQL Server, or mySQL. If I had to chose I'd take (2).Smile
Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.