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
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 Topic: Include Virtual/File
    Posted: 07 March 2005 at 7:16pm

Is there any way to include a file from a different folder on your web server?

I have files from my other domains in a different directory then my site i want to include them all and instead of having them twice i would prefer to be able to include the file using the exact path or something like that if possible.
 
If there is a way of doing this or an alternative that will work like this can someone please tell me ASAP.
 
Thanks in advance,
VTech
Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 2:59am

If you want to include a file from a different folder on your server simply do an include virtual. This maps from the root directory of your server so if you wanted to include default.asp from a folder called test simply do the following:

<!--include virtual="test/default.asp" -->
 
Is this what your looking for or did I miss the point ??
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 6:34am
The problem i am having with that is its 2 different root folders. I am trying to keep it like this so my client cannot see/mess up the asp coding for their sites.    
 
 
If that does not work, is there an asp function that you can include pages from different sites?
 
Like say one page is on http://mysite.com/page.htm and my site is http://othersite.com/ is there a way to make the page.htm show? Both sites are hosted on the same server just different root directories.
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 10:14am
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
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 11:52am
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.
 
Dude, theres not too different root folders the root folder is the webfolder. If you map the virtual as:
 
<!--#include virtual="site2.com/otherpage.asp"-->
 
You should be fine.
 
Chris
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 1:04pm
yes there is 2 root folders.

he wants to link a file from one site to another.... therefore 2 websites and therefore 2 root folders, 1 per a domain
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 2:11pm
Yeah Dude Tongue
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 2:45pm

Yes, I want what DJ said. Does anyone know if it is possible?

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.