Thanks I'll try that. What is the difference between file and virtual. Does file refer to physical address? Z:\section4\utils etc while virtual refers to an http? -Pete
It's probably because changing to the directory before /utils would move beyond the root of the webserver. If using "/utils/colorConst.asp" worked and "../utils/coorConst.asp" did not, that is likely the problem.
db
myapplication
utils colorConst.asp
manager ProjMngr.asp
I had the the line below in ProjMngr.asp:
<!--#include file="../Utils/colorConst.asp" --> but it returned an error saying ".." was not allowed in the include. I also tried:
<!--#include file="myapplication/Utils/colorConst.asp" -->
But It did not work either, but
<!--#include virtual="myapplication/Utils/colorConst.asp" -->
Did work, but I do not understand why or what the difference is between virtual and file includes. -Pete
I could be wrong but...I seem to remember reading that when using file, you're being explicit about the path while when using virtual, it looks everywhere on the machine (basically). Not sure why your first one didn't work...looks good based on the structure you show.
therefore, by using include file="hardcodedpath" you would need to change it when you upload it. After a while, it becomes a really bad headache.
hth leo
------------
Leo Mendoza
lmendoza@students.depaul.edu
#include
The #include directive instructs the Web server to insert the contents of a file into an HTML page. The included file can contain any content that is valid within an HTML document. You must surround a directive with HTML comment delimiters.
This directive can be used in both ASP pages and HTML pages.
Syntax
<!-- #include PathType = FileName -->
Parameters
PathType
Specifies the type of the path to FileName. The path type can be one of the following:
Path Type Meaning
File The file name is a relative path from the directory containing the document with the #include directive. The included file can be in the same directory or in a subdirectory; it cannot be in a directory above the page with the #include directive.
Virtual The file name is a full virtual path from a virtual directory in your Web site.
-Pete
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.