Author |
Topic  |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 13 March 2005 : 13:57:53
|
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
|
Use... <!--#INCLUDE FILE="gallery/file.asp" --> ...instead. |
Support Snitz Forums
|
Edited by - Davio on 13 March 2005 13:59:22 |
 |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 13 March 2005 : 14:09:31
|
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 |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 13 March 2005 : 14:10:51
|
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 |
 |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 13 March 2005 : 14:15:36
|
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 |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 13 March 2005 : 14:22:20
|
File with the include in the code: mywebsite.com/dir/photogal.asp
File to be included: mywebsite.com/dir/gallery/file.asp |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 13 March 2005 : 14:51:56
|
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! |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 13 March 2005 : 14:55:01
|
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" |
 |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 13 March 2005 : 15:07:24
|
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!  |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 13 March 2005 : 23:18:52
|
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
|
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
|
taropatch
Average Member
  
USA
741 Posts |
Posted - 14 March 2005 : 08:05:26
|
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. |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 16 March 2005 : 04:22:36
|
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" |
 |
|
|
Topic  |
|