Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    include virtual path

    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

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    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.

    Code:
    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

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi

    thanks for answer.

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

    thanks

  • #4
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •