Includes

Discussion in 'ASP General' started by Jeff, May 9, 2006.

  1. Jeff

    Jeff Guest

    I have an asp page. Now I know this is sortof OT, but I am not sure of the
    forum to get an answer.

    I have an include on this asp page

    <!-- #include file=\forum\includes\consts-inc.asp -->

    now, it gives me this error:
    File attribute '\forum\includes\consts-inc.asp' cannot start with forward
    slash or back slash.

    i can't use .. either, because it gives me this error:The Include file
    '..\forum\includes\consts-inc.asp' cannot contain '..' to indicate the
    parent directory.

    I tried with the slashes going / and \

    if i use this:
    <!-- #include file=forum/includes/consts-inc.asp -->
    i get this:
    The include file 'forum/includes/consts-inc.asp' was not found.

    for some information. i the file that gives the error is in the includes
    folder, which is in the root web. the forum folder is also in the root web.

    so i am in folder unthe root, and trying to include a file from another
    folder under the root.

    how can i do this??



    thanks in advance

    Jeff
     
    Jeff, May 9, 2006
    #1
    1. Advertising

  2. Jeff

    Steven Burn Guest

    http://support.microsoft.com/default.aspx?scid=kb;en-us;332117

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "Jeff" <> wrote in message
    news:...
    > I have an asp page. Now I know this is sortof OT, but I am not sure of the
    > forum to get an answer.
    >
    > I have an include on this asp page
    >
    > <!-- #include file=\forum\includes\consts-inc.asp -->
    >
    > now, it gives me this error:
    > File attribute '\forum\includes\consts-inc.asp' cannot start with forward
    > slash or back slash.
    >
    > i can't use .. either, because it gives me this error:The Include file
    > '..\forum\includes\consts-inc.asp' cannot contain '..' to indicate the
    > parent directory.
    >
    > I tried with the slashes going / and \
    >
    > if i use this:
    > <!-- #include file=forum/includes/consts-inc.asp -->
    > i get this:
    > The include file 'forum/includes/consts-inc.asp' was not found.
    >
    > for some information. i the file that gives the error is in the includes
    > folder, which is in the root web. the forum folder is also in the root

    web.
    >
    > so i am in folder unthe root, and trying to include a file from another
    > folder under the root.
    >
    > how can i do this??
    >
    >
    >
    > thanks in advance
    >
    > Jeff
    >
    >
     
    Steven Burn, May 9, 2006
    #2
    1. Advertising

  3. Jeff

    Mike Brind Guest

    Jeff wrote:
    > I have an asp page. Now I know this is sortof OT, but I am not sure of the
    > forum to get an answer.
    >
    > I have an include on this asp page
    >
    > <!-- #include file=\forum\includes\consts-inc.asp -->
    >
    > now, it gives me this error:
    > File attribute '\forum\includes\consts-inc.asp' cannot start with forward
    > slash or back slash.
    >
    > i can't use .. either, because it gives me this error:The Include file
    > '..\forum\includes\consts-inc.asp' cannot contain '..' to indicate the
    > parent directory.
    >
    > I tried with the slashes going / and \
    >
    > if i use this:
    > <!-- #include file=forum/includes/consts-inc.asp -->
    > i get this:
    > The include file 'forum/includes/consts-inc.asp' was not found.
    >
    > for some information. i the file that gives the error is in the includes
    > folder, which is in the root web. the forum folder is also in the root web.
    >


    Is includes in the web root or in the forums directory? What you've
    said is contradictory. If your includes is really in the web root do
    this:

    <!--#include virtual="includes/consts-inc.asp"-->

    If it is in the forums directory, which is in web root, do this:

    <!--#include virtual="forums/includes/consts-inc.asp"-->

    Oh, and your question is not OT. It's a general ASP question :)

    --
    Mike Brind
     
    Mike Brind, May 9, 2006
    #3
  4. Jeff

    Mike Brind Guest

    Jeff wrote:
    > Mike Brind wrote:
    > > Jeff wrote:
    > > > I have an asp page. Now I know this is sortof OT, but I am not sure of the
    > > > forum to get an answer.
    > > >
    > > > I have an include on this asp page
    > > >
    > > > <!-- #include file=\forum\includes\consts-inc.asp -->
    > > >
    > > > now, it gives me this error:
    > > > File attribute '\forum\includes\consts-inc.asp' cannot start with forward
    > > > slash or back slash.
    > > >
    > > > i can't use .. either, because it gives me this error:The Include file
    > > > '..\forum\includes\consts-inc.asp' cannot contain '..' to indicate the
    > > > parent directory.
    > > >
    > > > I tried with the slashes going / and \
    > > >
    > > > if i use this:
    > > > <!-- #include file=forum/includes/consts-inc.asp -->
    > > > i get this:
    > > > The include file 'forum/includes/consts-inc.asp' was not found.
    > > >
    > > > for some information. i the file that gives the error is in the includes
    > > > folder, which is in the root web. the forum folder is also in the root web.
    > > >

    > >
    > > Is includes in the web root or in the forums directory? What you've
    > > said is contradictory. If your includes is really in the web root do
    > > this:
    > >
    > > <!--#include virtual="includes/consts-inc.asp"-->
    > >
    > > If it is in the forums directory, which is in web root, do this:
    > >
    > > <!--#include virtual="forums/includes/consts-inc.asp"-->
    > >
    > > Oh, and your question is not OT. It's a general ASP question :)
    > >

    >
    >well.. the forums is in the root... and of course forums/includes
    >isn't. my bad for wording that wrong.
    >i have this
    ><!--#include virtual="forums/includes/consts-inc.asp"-->
    >and still getting this
    >
    >Include file not found
    >
    >/includes/forum-inc.asp, line 37
    >
    >The include file 'forums/includes/consts-inc.asp' was not found.


    forums - plural

    >
    >i looked over the permissions and i don't see
    >anything about parent paths.
    >
    >i know the file is there, as here is the path copied straight from
    >the tree.
    >
    >http://my.domain/forum/includes/consts-inc.asp
    >


    forum - singular


    So which is it? Is the directory called forum or forums (plural)?
    That's probably why the file can't be found.

    Please make sure you reply to the newsgroup in future, not the
    spam-trap email address I use here. The delay in responding is because
    I hardly ever look at that email account. Lucky for you, I was kind of
    bored this morning :)

    --
    Mike Brind
     
    Mike Brind, May 15, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Geraldine

    includes in ASP .NET

    Geraldine, Oct 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    326
    Kevin Spencer
    Oct 29, 2003
  2. Tor Nordahl

    WEBBOT includes and .ASPX

    Tor Nordahl, Nov 4, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    390
    Tor Nordahl
    Nov 4, 2003
  3. Steve

    Virtual Includes in ASP.NET

    Steve, Nov 19, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    421
    Jim Cheshire [MSFT]
    Nov 19, 2003
  4. Davíð Þórisson

    migrating asp to aspl.net: includes?

    Davíð Þórisson, Dec 30, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    397
    Davíð Þórisson
    Dec 30, 2003
  5. Jay

    Using includes with ASP.NET

    Jay, Jan 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    500
Loading...

Share This Page