#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    95
    Rep Power
    12

    Question <!-- #include question


    I have built and tested the following www.site.com/mobile/test.asp. This test.asp page requires a file included:
    Code:
    <!-- #include virtual = "/includes/Class.asp" -->
    This is because
    Code:
    <!-- #include file = "../includes/Class.asp" -->
    does not work on my live server.

    My Issue is that I need to set up a subdomain of m.site.com that points to the www.site.com/mobile folder, however once that is set up including a file virtually does not work as there is no /includes folder within the /mobile folder.

    Is there a way of having a .asp page within a subdomain that can file include form the parent domain?

    Thanks in advance
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Try using include file with the complete disk path to the file, not a relative path with ../
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    95
    Rep Power
    12
    Cheers Doug G, but I tried that before doing my post, all I got was:

    Include file not found
    /mobile/test.asp, line 2
    The include file 'D:\Inetpub\wwwroot\site\includes\Class.asp' was not found.


    Where I know it is at that location as Request.servervariables("PATH_TRANSLATED") in the Class.asp file matched that in the error message above
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    I guess check the permissions on that file and verify the web server has access to it. I don't do much with asp any longer, but in the past there were no problems with including a file from outside the web space.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo