Print Page | Close Window

Header File Includes

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15753
Printed Date: 13 April 2026 at 10:16am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Header File Includes
Posted By: infiniteLoop
Subject: Header File Includes
Date 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.



Replies:
Posted By: dpyers
Date 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.


Posted By: infiniteLoop
Date 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.


Posted By: dpyers
Date 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.


Posted By: infiniteLoop
Date Posted: 09 July 2005 at 3:16am
I thought ../ takes you straight to the root.
 
Guess i was wrong then.
Thanx


Posted By: dpyers
Date 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.


Posted By: theSCIENTIST
Date Posted: 09 July 2005 at 2:46pm
It does, but not if IIS has parent paths disabled which most hosts do for increased security.

-------------
:: http://www.mylittlehost.com/ - www.mylittlehost.com


Posted By: infiniteLoop
Date Posted: 09 July 2005 at 3:48pm
This kind of stuff always confuse me. Thanx for clarifying this for me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net