Include file

Results 1 to 8 of 8

Thread: Include file

  1. #1
    Ian Wallace Guest

    Default Include file

    hello<BR><BR>I am uploading a file that has an include and am getting an error because I am using ....file="../login.asp"... and it says that I cannot use the "../", if so then what is the syntax to reference a file in the directory above it ?<BR><BR>Many Thanks<BR>Ian

  2. #2
    Maybe Guest

    Default RE: Include file

    Try this one<BR><BR>&#060;!-- #INCLUDE VIRTUAL="../yourfile" --&#062;

  3. #3
    Ian Wallace Guest

    Default Still not working

    Hi<BR><BR>No that didn&#039t work, here is the error I got:<BR>---------------------------------------------------<BR>Active Server Pages error &#039ASP 0131&#039 <BR><BR>Disallowed Parent Path <BR><BR>/othersites/sts_dev/members/menu.txt, line 57 <BR><BR>The Include file &#039../ads_inc_level2.txt&#039 cannot contain &#039..&#039 to indicate the parent directory. <BR>-----------------------------------------<BR><BR>And the include is written as :<BR>-------------<BR>&#060;!-- #include virtual="../ads_inc_level2.txt" --&#062;<BR>-------------<BR><BR>Any thoughts ?<BR><BR>Thanks<BR>Ian<BR>

  4. #4
    Maybe Guest

    Default RE: Include file

    I&#039ve tested with ..file="../filename" and it works for me fine, so I&#039m sorry cannot offer any more suggestions, other than maybe an IIS setting but don&#039t know enough about it to be of assistance.<BR><BR>Good luck anyway

  5. #5
    Ian W Guest

    Default RE: Include file


  6. #6
    Skippie Guest

    Default RE: Include file

    I&#039m guessing that you&#039re trying to access a directory that&#039s <BR>outside of the site&#039s scope.<BR><BR>For example, suppose your site&#039s home page is at this dir:<BR><BR>c:inetpubwwwroot hesiteindex.asp<BR><BR>You have it set up so that thesite directory is the root directory<BR>of the site.<BR><BR>In this case, you cannot access c:inetpubwwwrootlogin.asp <BR>since the file lives outside where the site can see. <BR><BR>Otherwise, you would have to set up a virtual directory, or move<BR>the login.asp file to another location within the site to make<BR>it work.<BR><BR><BR>-- Skippie<BR>

  7. #7
    KPW Guest

    Default RE: Include file

    Does it work if you change the forward slash to a backslash?<BR><BR>...file="..login.asp"

  8. #8
    Shedao Shai Guest

    Default RE: Still not working

    The parent path has been disabled. Im assuming this is for security reasons. Usually ISP admins will do this. Try using the absolute path ("C:filesetc"). If you don&#039t know what it is try retrieving it using Server.MapPath(virtualDirPathHere)<BR><BR>Ian S

Posting Permissions

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