...

View Full Version : include virtual path



urko
12-07-2006, 11:49 AM
Hi

I have small problem.
As my host doesnt allow parent path i need to change all paths to the virutal path.
<!--#include virtual="/test/myfile.asp" -->

However as my folder on web will not be named test I dont want to change 30 or more files to a different name.


So I was thinking if it's possible to write instead of "test"
Example:
Dim strmypath
strmypath = "/myfolder/"
<!--#include virtual="/<%=strmypath%>/myfile.asp" -->

I tried that but it's not working! Is it possible to do it???

Thanks

ess
12-07-2006, 03:52 PM
I had a similar problem sometime ago whilst developing a website in PHP. I solved the problem by creating a symbolic link.

But since you are using windows...not sure if you can create symbolic links at all.

Have you tried using the following.


Request.ServerVariables (PATH_TRANSLATED)

The above statement should take a given path and performs any necessary virtual-to-physical mapping to a given path.

Good luck.
Ess

urko
12-07-2006, 05:04 PM
Hi

thanks for answer.

Not sure if i know how to do it right. Some tip??

thanks

degsy
12-18-2006, 04:21 PM
You cannot use variables in the SSI include.

You could try using Server.Execute instead, otherwise you will have to edit the links.
Use a search & replace tool.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum