ASP Express Home | What You Get | Pricing Information
New-->Online User Count
Using DatePart and other Date Functions
(Updated) Using Variables, Single & DoubleQuotes with SQL Statements in ASP
(Updated) Emailing Form Results
Mass Emailing with CDO
Using The Ad Rotator
ASCII Character Set 0-127
Include - Basic
Understanding Include Statements
Many people find include files very confusing, as I once did when I started learning ASP. To start out understanding this concept, really the only things you need to understand are general file/folder structure and the fact that, when IIS (the web server that comes and is most often used with NT) is installed, by default, it installs it, in a structure resembling the following :
Drive Letter :\inetpub\wwwroot. This is the 'Web Root' of your web site.
An include file must have a relative path - you must list it as a path relative to where its parent ASP document is.
If it is in the same directory -
If it is in the security folder beneath that directory -
<!-- #include file="security.inc" -->
If it is in a folder above it -
<!-- #include file="security/security.inc" -->
(and yes, I've used this and it works)
<!-- #include file="../security.inc" -->
Otherwise - use Include Virtual - it works from the Web Root, so if your ASP is in C:\Inetpub\wwwroot\user\project\security.inc, you start from the Web Root, which is Inetpub\wwwroot -
This should clear things up a little bit, I hope. By the way - there is an easy 'Include File Assistant' which has been a native feature in ASP Express since it's inception. Click here to find out more about ASP Express.
<!-- #include virtual="/user/project/security.inc" -->