Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help!, Want to iclude file in Header.inc
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help!, Want to iclude file in Header.inc

 Post Reply Post Reply
Author
wrang View Drop Down
Groupie
Groupie
Avatar

Joined: 31 January 2003
Location: Sweden
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote wrang Quote  Post ReplyReply Direct Link To This Post Topic: Help!, Want to iclude file in Header.inc
    Posted: 02 May 2003 at 7:33am
Hello I want to include file in the the file header.inc
<!-- #include file="xx.asp" -->
But when i do that i came up a error message
Active Server Pages error 'ASP 0126'
Include file not found
/database/forum_test/header.inc, line 169
The include file 'banners/include/admentor3.asp' was not found.

But the file admentor3.asp is on the server, But it still came upp this error message!!

How do i put a <!-- #include file="X.asp" --> in the forum

Help me please
Back to Top
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Posted: 02 May 2003 at 7:38am
*Where* on the server is the file?

Try <!--#include virtual="/banners/include/admentor3.asp"-->

If you've missed the first "/", it will be looking for a directory called "banners" within the forum directory.
www.pedalcars.info

The most fun on four wheels

Back to Top
wrang View Drop Down
Groupie
Groupie
Avatar

Joined: 31 January 2003
Location: Sweden
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote wrang Quote  Post ReplyReply Direct Link To This Post Posted: 02 May 2003 at 8:22am
Hello
The file I want to include is in the main site.
But when i test with
 
<!--#include virtual="../../banners/include/admentor3.asp"-->
It still came up the error message
Active Server Pages error 'ASP 0126'
Include file not found
/database/forum_test/header.inc, line 169
The include file 'admentordb2.asp' was not found.
In the forum i want to display a file caled huvud.asp witch lays in the main so I will put the link <!--#include virtual="../../huvud.asp"-->
And in this file I have the link to the banners
<!--#include file="banners/include/admentor3.asp"-->

And now the error pop up agin
 Include file not found
/database/forum_test/header.inc, line 170
The include file 'banners/include/admentor3.asp' was not found.


But the file is still there
Hope u can understand what I meant



Edited by wrang
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: 02 May 2003 at 8:38am
You need to understand how includes work. There are relative and absolute includes.
Absolute: <!--#Include Virtual="dir/file.asp"-->
Relativ   : <!--#Include File="file.asp"-->
The difference is that absolute includes always go from the root of your website so if you want to include a file located in e.g. http://www.mysite.com/home/includes/file.asp you would always write an absolute statement like that:
<!--#Include Virtual="home/includes/file.asp"-->  no matter where you are calling it from.
If you decide to use relative includes it will include it from where you are calling it. so if the calling page is in let's say ../home/app/default.asp and you would like to include the very same file as before you would have to write <!--#Include File="../includes/file.asp"--> Now if you have this file calling another include so if file.asp is calling an include by itself you need to go relative from the include file and not from the first requesting page. For this reason and confusion it is always recommended to use absolute includes because it does not matter where you make the call from. In an application like this forum though it would be almost impossilbe as you never know where people put the forum. so relativ is used.
Back to Top
 Post Reply Post Reply

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.