Click to See Complete Forum and Search --> : Include problem


ozpo1
02-08-2007, 03:20 PM
Hi, I have a problem with the include command.
I have a file named contracotrs.inc and I uploaded it into my main directory (/wwwRoot).

When I call this file from an inner directory I receive the following error:

Active Server Pages error 'ASP 0126'

Include file not found

/Florida/contractors.asp, line 42

The include file 'http://getcontractor.com/contractors.inc' was not found.

When I upload the page to the inner directory and called it from there (with out the http...) everything is working.
Can someone explain it? and how to solve it?

Thanks, Oz.

gil davis
02-08-2007, 03:43 PM
You probably have used:
<!--#include file="http://getcontractor.com/contractors.inc"-->
Use this instead:
<!--#include virtual="/contractors.inc"-->
Explanation: "file" will only get you what is in the same directory, whereas "virtual" will allow you to look elsewhere.

russell
02-08-2007, 04:56 PM
Gil is right. See this thread (http://www.webdeveloper.com/forum/showthread.php?t=110351) for a detailed explanation