Forum Moderators: open

Message Too Old, No Replies

default include folder

How to create a default include folder for asp

         

Philly

5:56 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Hello. I usually work with php, but am trying to learn asp as well. When working with php, one can make a default include directory simply by putting the line "php_value include_path .:/home/folder/public_html/path to folder" into the root .htaccess file.

Is there a way to do this on a windows server as well? And without server permissions? For example, for the example above, one only needs access to the public_html folder to accomodate the need.

Thank you.

Prolific

6:04 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



I usually just create an /include directory and stash them all there.

There are two ways to call your includes:

<!--#include virtual="filename.asp"-->
<!--#include file ="filename.asp"-->

virtual is for using virtual directories (/include/filename.asp)

file is relative path (../filename.asp, ./filename.asp, filename.asp)

I do not believe there is a directive in IIS to create a default include directory.

Philly

6:16 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Thanks Prolific for your info. I had figured out how to call them, it just seems like such a waste to have to type in the path with every common include. You would think Bill would make a way to have a default directory, so all you would have to do is type in the file name, then the action would be to 1st check the folder it is in, then to go to the default include directory if it wasn't found in the 1st folder.

Philly

6:46 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Thanks again...
It seems you gave me the solution, and I did not even know it.

<!--#include virtual ="/TopLevelPath/Borders/DTD.asp"-->

The default directory is the root folder!

Prolific

1:37 am on May 1, 2005 (gmt 0)

10+ Year Member



Glad to help. I ran into the same issue years ago when I was learning ASP.