Web Wiz - Solar Powered Eco Web Hosting

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

Include

 Post Reply Post Reply
Author
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Topic: Include
    Posted: 17 May 2003 at 3:26am

Hi, includes work fine when you use

<!--#include file="config.asp" -->

But it doesn't work for

<!--#include virtual="config.asp" -->

Whats the problem?

Thanks, Martin.

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: 17 May 2003 at 4:21am
Originally posted by Mart Mart wrote:

Hi, includes work fine when you use

<!--#include file="config.asp" -->

But it doesn't work for

<!--#include virtual="config.asp" -->

Whats the problem?

Thanks, Martin.

<!--#include virtual="config.asp" --> =

from root scructure ie /aaa/config so it would be

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

with <!--#include file="config.asp" --> is used for the directory you are in or if you want it in a directory below that folder or above you sue the ../ or aaa/ last one is the folder name

so for the virtual one above start with the /

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2003 at 8:33am
Virtual starts in the root directory and moves from there.
File starts in the current directory and moves from there.

If your structure is

C:\inetpub\wwwroot\directory\subdirectoty
and you are in directory and trying to include a file in subdirectory then it would be

file="subdirectory/file.inc" or
virtual = "directory/subdirectory/file.inc"

I personally use virtual because even if the file change in relation to each other, I rarely change them in relation to the root directory. Most of my includes file end up in a "inc" directory off the root any way.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2003 at 9:48am
Ok that works now, but whats the differance between virtual and file anyway?
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2003 at 10:00am
The only difference is where the parser looks for the directory. As I said above with "virtual" it starts at the root and with "file" it starts with the current directory.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 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 Policy

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 unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

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