Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Header File Includes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Header File Includes

 Post Reply Post Reply
Author
infiniteLoop View Drop Down
Newbie
Newbie


Joined: 06 July 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote infiniteLoop Quote  Post ReplyReply Direct Link To This Post Topic: Header File Includes
    Posted: 06 July 2005 at 5:25pm
I just started using WebWiz forum and have encountered several problems.
 
1. I placed some HTML in the header file and a server side include that goes like this <!--#include file="../ad/link.asp"--> and it cannot find the file place under the root directory. But when i place the "ad" folder inside the "forum" folder, it worked without a problem.
Why does it do that? My "forum" folder is not a sub-domain or sub-web, and links such as "../scripts/default.asp" that are placed in header.asp all work fine.
 
2. Also, in the registration page, the upload avatar page cannot be displayed or found. Does this have something to do with ASPUpload objects?
 
Thanx.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 07 July 2005 at 1:09am
1. Use include virtual
2. Do you have uploads enabled and the paths set up properly in the admin section?

Lead me not into temptation... I know the short cut, follow me.
Back to Top
infiniteLoop View Drop Down
Newbie
Newbie


Joined: 06 July 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote infiniteLoop Quote  Post ReplyReply Direct Link To This Post Posted: 07 July 2005 at 9:55pm

1. I tried the include virtual but it didnt work. What I dont get is that why does it only look into the forum folder and not the root directory, and why does include file works with ad folder placed inside the forum folder, while the same does not work with include virtual?

2. I solved this upload problem by reuploading the upload page.
 
Thanx for the reply.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2005 at 12:14pm
header.asp is in the /forum/includes directory which is 2 levels down from your root. the forum floder is only one level down. You need to add another ../ to back up the additional level.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
infiniteLoop View Drop Down
Newbie
Newbie


Joined: 06 July 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote infiniteLoop Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 3:16am
I thought ../ takes you straight to the root.
 
Guess i was wrong then.
Thanx
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 11:58am
../ takes you up one directory level.

One of the problems with include file is that the deeper you go in your directory tree, the more ../ you need for a path.

With include vitual though, all paths are relative to the root.
So the same include virtual for  /filename.asp can be used to reference a file in the root regardless of where in the directory tree the file is located - you don't have to worry about counting ../'s.
For files in directories, it would just be /dir1/subdir/filename.asp - again, the same path to the file is used regardless of where in the tree you use the include virtual.

Include file is outdated. Borg uses it for compatibility with ASP 2.0 and older OS's. Any webhost running ASP 3.0 - which comes with OS's from Win2K on - will have include virtual support.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 2:46pm
It does, but not if IIS has parent paths disabled which most hosts do for increased security.
Back to Top
infiniteLoop View Drop Down
Newbie
Newbie


Joined: 06 July 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote infiniteLoop Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 3:48pm
This kind of stuff always confuse me. Thanx for clarifying this for me.
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.