Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 help with <!--#INCLUDE VIRTUAL
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

taropatch
Average Member

USA
741 Posts

Posted - 13 March 2005 :  13:57:53  Show Profile
mywebsite.com/dir/gallery/file.asp

I have an asp file that is in the "dir" folder. I am trying to include the above file using this line:
<!--#INCLUDE VIRTUAL="/dir/gallery/file.asp" -->

I get this error:
Microsoft VBScript runtime error '800a004c'

Path not found


I think if the file to be included is in the dir folder it works. I just cannot drill down 2 directories. Should I be able to do this or is this not how it works?

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 March 2005 :  13:59:12  Show Profile
Use...
<!--#INCLUDE FILE="gallery/file.asp" -->
...instead.

Support Snitz Forums

Edited by - Davio on 13 March 2005 13:59:22
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 13 March 2005 :  14:09:31  Show Profile
Hi Davio,

Thanks for the super quick reply.

Now I get:
Active Server Pages error 'ASP 0126'

Include file not found

/dir/photogal.asp, line 44

The include file 'gallery/file.asp' was not found.


Oops, I did not see virtual changed for file. Okay, I made your changes and it is so close. Not sure why it cannot find the file but at least it appears to be looking in the right place. The photogal.asp page opens and the error appears where the include should be.
quote:
Microsoft VBScript runtime error '800a004c'

Path not found

/dir/gallery/file.asp, line 50
I know the file is there.

Edited by - taropatch on 13 March 2005 14:19:33
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 13 March 2005 :  14:10:51  Show Profile  Visit D3mon's Homepage
I have to admit, I'm still not entirely clear on the correct usage of #INCLUDE VIRTUAL myself. I think it has do with virtual folders set upon the server, but since all my work is hosted on remote servers, I've never used it.

Try this:

<!--#INCLUDE FILE="dir/gallery/file.asp" -->


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"

Edited by - D3mon on 13 March 2005 14:11:44
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 13 March 2005 :  14:15:36  Show Profile
quote:
Originally posted by D3mon

I have to admit, I'm still not entirely clear on the correct usage of #INCLUDE VIRTUAL myself. I think it has do with virtual folders set upon the server, but since all my work is hosted on remote servers, I've never used it.

Try this:

<!--#INCLUDE FILE="dir/gallery/file.asp" -->

Trying this one, I get the dreaded white page:

Active Server Pages error 'ASP 0126'

Include file not found

/dir/photogal.asp, line 44

The include file 'dir/gallery/file.asp' was not found.


Edited by - taropatch on 13 March 2005 14:20:01
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 13 March 2005 :  14:19:36  Show Profile  Visit D3mon's Homepage
what is the path to the file that you're 'including' from?


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 13 March 2005 :  14:22:20  Show Profile
File with the include in the code:
mywebsite.com/dir/photogal.asp

File to be included:
mywebsite.com/dir/gallery/file.asp
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 13 March 2005 :  14:24:46  Show Profile  Visit D3mon's Homepage
in that case, I think it should be:

<!--#INCLUDE FILE="gallery/file.asp" -->


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 13 March 2005 :  14:51:56  Show Profile
Yes, thanks guys. That is correct. I had just tried so many combinations that I was starting to lose my mind. The issue is now isolated to my file.asp which I can now focus on. Thank a bunch!
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 13 March 2005 :  14:55:01  Show Profile  Visit D3mon's Homepage
Your question forced me to re-think 'virtual' includes. In doing so, I discovered the solution to a problem I had! Yay! Thanks Taropatch.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 13 March 2005 :  15:07:24  Show Profile
quote:
Originally posted by D3mon

Your question forced me to re-think 'virtual' includes. In doing so, I discovered the solution to a problem I had! Yay! Thanks Taropatch.

Glad my confusion is helping someone!
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 March 2005 :  23:18:52  Show Profile
LoL! But my first post to you was correct. The error message you got was an error in the file.asp file on line 50. So you both went round in circles and straight back to the answer I provided in my post.

Just glad you sorted it out.

Support Snitz Forums
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 14 March 2005 :  06:01:47  Show Profile  Visit D3mon's Homepage
Yes indeed, I hadn't noticed that!
Using 'virtual' does require the contents of the include file to be properly referenced.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 14 March 2005 :  08:05:26  Show Profile
Yep, Davio gets credit for the quick, correct answer. D3mon gets credit for correct answer and circular trip.

Ha, seriously though. I appreciate the help from both of you to help me find the answers that I needed. Took me a while to get there.
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 15 March 2005 :  19:27:40  Show Profile
http://msdn.microsoft.com/library/en-us/iissdk/html/4ab8329d-84f0-4f31-8a67-4861ad48918a.asp

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 16 March 2005 :  04:22:36  Show Profile  Visit D3mon's Homepage
isn't it amazing that they still say:
quote:
Included files do not require a special file name extension; however, it is considered good programming practice to give included files an .inc extension to distinguish them from other types of files.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.68 seconds. Powered By: Snitz Forums 2000 Version 3.4.07