Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virual Include File Question 1

Status
Not open for further replies.

SeanB

Programmer
Jul 19, 2001
70
0
0
US
I have a ASP page that has the following:
<!-- #include virtual = &quot;db_connection.inc&quot; -->
I forget but it says The include file 'db_connection.inc' was not found.

Where do I place the file? I do have the file under the page root does it need to be in the directory? Thanks
 
for virtual, yes.

it checks your root directory, then goes up folders from there.

for file, it checks relative to the document that is including the <!--#include

hth
leo leo
 
Make a virtual directory(for example with web sharing from explorer on a desired directory) the put your file in that folder and in your ASP write this:
<!-- #include virtual = &quot;my_virtual_dir/db_connection.inc&quot; -->
s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darkness...
 
What does include virtual do then include? ________

George
 
include virtual starts at the root of your web, then checks the directories from there, while file is only a relative path name.

say your directory structure is like so:

C:\ \Includes
\images
\newimg
\users

now assume that in folder users is a file with the declaration,
<!--#include virtual=&quot;includes/myinc.asp&quot;-->
This line starts from your then checks your /Includes folder for myinc.asp.
So in actuality, the full path it checks for is C:\
Now say in folder users is another file with the declaration, <!--#include file=&quot;includes/myinc.asp&quot;-->.
This line checks relative to the calling file, so it will check relative to the users folder.
So in actuality, the full path it checks for is
C:\
hth
leo
leo
 
Has anyone run into the issue of this same error message appearing even with the Include file copied into the directory? I have both the asp file and include file where they are supposed to be (I think) yet am still getting this error message:

Active Server Pages error 'ASP 0126'

Include file not found

/newsite/parentinvolvement/spanish/index.asp, line 148

The include file 'spanish_top.inc' was not found.

any help would be most appreciated. tia
 
Bonjour;
Je besoins d'une fonction ASP qui affiche le chemin d'accés aux fichier dans ma base de données SQL server.
THANKS,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top