include files not being included

Discussion in 'HTML' started by tshad, Apr 25, 2005.

  1. tshad

    tshad Guest

    I have the following file that I am trying to set up with 2 include files
    that don't seem to open. I am running both on my XP and a Win2003 server
    and get the problem in both places.

    I have tried this with both putting the include files in the same folder as
    well as an external includes folder and I can't seem to get the files to
    work.

    If I take the code out and put them directly in the file, it works fine.
    The images work fine (if not being called from the include.inc file), so the
    relative paths work fine.

    ******************************************************************************************************
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>:: Staffing Workshop ::</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="../final-site/option2/css/staffing.css" rel="stylesheet"
    type="text/css">
    <style type="text/css">
    <!--
    body {
    margin-top: 21px;
    }
    ..style1 {
    font-size: 18px;
    font-weight: bold;
    }
    -->
    </style>
    </head>

    <body>
    <!-- #include file="\header.inc" -->
    <td width="587" height="308" align="left" valign="top"
    background="../final-site/option2/images/table-bg.gif">
    <table width="571" border="0" height="72">
    <tr>
    <td width="133" height="12"></td>
    <td width="428" height="12"></td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top" height="12"></td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top" height="1"><blockquote
    class="style1">Employer Overview</blockquote></td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top"
    height="14"><blockquote>&nbsp;
    </blockquote></td>
    </tr>
    </table>
    </td>
    <!-- #include file="\includes\footer.inc" -->
    </body>
    </html>
    *******************************************************************************************************

    Thanks,

    Tom
    tshad, Apr 25, 2005
    #1
    1. Advertising

  2. tshad wrote:
    > I have the following file that I am trying to set up with 2 include files
    > that don't seem to open. I am running both on my XP and a Win2003 server
    > and get the problem in both places.
    >
    > I have tried this with both putting the include files in the same folder as
    > well as an external includes folder and I can't seem to get the files to
    > work.
    >
    > If I take the code out and put them directly in the file, it works fine.
    > The images work fine (if not being called from the include.inc file), so the
    > relative paths work fine.


    [snip some codes]

    > <!-- #include file="\header.inc" -->

    try to use slash "/" instead of back-slash "\"
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
    Edwin van der Vaart, Apr 25, 2005
    #2
    1. Advertising

  3. tshad

    Phil A Guest

    Edwin van der Vaart <> wrote in
    news:<Nhcbe.2299$184.1123@amstwist00>

    > > <!-- #include file="\header.inc" -->

    > try to use slash "/" instead of back-slash "\"


    #Slash (a-ah) bane of your Universe
    #(Doo-do-doo-do)

    > Edwin van der Vaart


    Please tell me you have a short, chubby family member called Rafael.

    --
    Illegitimi non carborundum
    Phil A, Apr 25, 2005
    #3
  4. tshad

    Arne Guest

    Once upon a time *tshad* wrote:

    > I have the following file that I am trying to set up with 2 include files
    > that don't seem to open. I am running both on my XP and a Win2003 server
    > and get the problem in both places.
    >
    > I have tried this with both putting the include files in the same folder as
    > well as an external includes folder and I can't seem to get the files to
    > work.
    >
    > If I take the code out and put them directly in the file, it works fine.
    > The images work fine (if not being called from the include.inc file), so the
    > relative paths work fine.
    >
    > *****************************************************************************
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <title>:: Staffing Workshop ::</title>
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > <link href="../final-site/option2/css/staffing.css" rel="stylesheet"
    > type="text/css">
    > <style type="text/css">
    > <!--
    > body {
    > margin-top: 21px;
    > }
    > .style1 {
    > font-size: 18px;
    > font-weight: bold;
    > }
    > -->
    > </style>
    > </head>
    >
    > <body>
    > <!-- #include file="\header.inc" -->
    > <td width="587" height="308" align="left" valign="top"
    > background="../final-site/option2/images/table-bg.gif">
    > <table width="571" border="0" height="72">
    > <tr>
    > <td width="133" height="12"></td>
    > <td width="428" height="12"></td>
    > </tr>
    > <tr>
    > <td colspan="2" align="left" valign="top" height="12"></td>
    > </tr>
    > <tr>
    > <td colspan="2" align="left" valign="top" height="1"><blockquote
    > class="style1">Employer Overview</blockquote></td>
    > </tr>
    > <tr>
    > <td colspan="2" align="left" valign="top"
    > height="14"><blockquote>&nbsp;
    > </blockquote></td>
    > </tr>
    > </table>
    > </td>
    > <!-- #include file="\includes\footer.inc" -->
    > </body>
    > </html>
    > **********************************************************************************
    >


    Use slash instead of back-slash.

    Also I belive there should not be any space between <!-- and # since
    the space can instruct the server that it's a comment to ignore from
    rendering.

    "#include file" works only if the included file is in the same folder
    as the file where it's to be included.

    <!--#include virtual="/somedir/file.txt" --> works also with the
    included file on a external folder.

    --
    /Arne

    Top posters will be ignored. Quote the part you
    are replying to, no more and no less! And don't
    quote signatures, thank you.
    Arne, Apr 25, 2005
    #4
  5. tshad

    tshad Guest

    "Edwin van der Vaart" <> wrote in message
    news:Nhcbe.2299$184.1123@amstwist00...
    > tshad wrote:
    >> I have the following file that I am trying to set up with 2 include files
    >> that don't seem to open. I am running both on my XP and a Win2003 server
    >> and get the problem in both places.
    >>
    >> I have tried this with both putting the include files in the same folder
    >> as well as an external includes folder and I can't seem to get the files
    >> to work.
    >>
    >> If I take the code out and put them directly in the file, it works fine.
    >> The images work fine (if not being called from the include.inc file), so
    >> the relative paths work fine.

    >
    > [snip some codes]
    >
    >> <!-- #include file="\header.inc" -->

    > try to use slash "/" instead of back-slash "\"


    Tried that and it isn't working. The interesting thing is that it works in
    the DreamWeaver in the design mode (\), but (/) doesn't.

    But the code that works in DW, doesn't work from the Server itself.

    Tom
    > --
    > Edwin van der Vaart
    > http://www.semi-conductor.nl/ Links to Semiconductors sites
    > http://www.evandervaart.nl/ Under construction
    tshad, Apr 25, 2005
    #5
  6. Phil A wrote:
    > Edwin van der Vaart <> wrote in
    >
    >>Edwin van der Vaart

    >
    > Please tell me you have a short, chubby family member called Rafael.

    So sorry. Rafael isn't a member of mine family.
    The family tree of Rafael van der Vaart comes from Rotterdam. Mine
    family tree comes from Friesland (the Nothern part of the Netherlands).
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
    Edwin van der Vaart, Apr 25, 2005
    #6
  7. tshad wrote:
    > "Edwin van der Vaart" <> wrote in message
    > news:Nhcbe.2299$184.1123@amstwist00...
    >
    >>tshad wrote:
    >>
    >>>I have the following file that I am trying to set up with 2 include files
    >>>that don't seem to open. I am running both on my XP and a Win2003 server
    >>>and get the problem in both places.
    >>>
    >>>I have tried this with both putting the include files in the same folder
    >>>as well as an external includes folder and I can't seem to get the files
    >>>to work.
    >>>
    >>>If I take the code out and put them directly in the file, it works fine.
    >>>The images work fine (if not being called from the include.inc file), so
    >>>the relative paths work fine.

    >>
    >>[snip some codes]
    >>
    >>
    >>><!-- #include file="\header.inc" -->

    >>
    >>try to use slash "/" instead of back-slash "\"

    >
    >
    > Tried that and it isn't working. The interesting thing is that it works in
    > the DreamWeaver in the design mode (\), but (/) doesn't.
    >
    > But the code that works in DW, doesn't work from the Server itself.

    Did you also tried on the server with the "/".
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
    Edwin van der Vaart, Apr 25, 2005
    #7
  8. tshad

    tshad Guest

    "Edwin van der Vaart" <> wrote in message
    news:I5dbe.2310$184.1439@amstwist00...
    > tshad wrote:
    >> "Edwin van der Vaart" <> wrote in message
    >> news:Nhcbe.2299$184.1123@amstwist00...
    >>
    >>>tshad wrote:
    >>>
    >>>>I have the following file that I am trying to set up with 2 include
    >>>>files that don't seem to open. I am running both on my XP and a Win2003
    >>>>server and get the problem in both places.
    >>>>
    >>>>I have tried this with both putting the include files in the same folder
    >>>>as well as an external includes folder and I can't seem to get the files
    >>>>to work.
    >>>>
    >>>>If I take the code out and put them directly in the file, it works fine.
    >>>>The images work fine (if not being called from the include.inc file), so
    >>>>the relative paths work fine.
    >>>
    >>>[snip some codes]
    >>>
    >>>
    >>>><!-- #include file="\header.inc" -->
    >>>
    >>>try to use slash "/" instead of back-slash "\"

    >>
    >>
    >> Tried that and it isn't working. The interesting thing is that it works
    >> in the DreamWeaver in the design mode (\), but (/) doesn't.
    >>
    >> But the code that works in DW, doesn't work from the Server itself.

    > Did you also tried on the server with the "/".


    Yes.

    Here are 2 examples you can see:
    http://www.payrollworkshop.com/Samples/test.htm
    http://www.payrollworkshop.com/Samples/test2.htm

    The test.htm:

    *******************************************************************************
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 strict//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <body>
    <!--#include file="\testinc.htm"-->
    <br>To see this work.
    </body>
    </html>
    *******************************************************************************

    The test2.htm:

    ******************************************************************************
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 strict//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <body>
    <!--#include file="/testinc.htm"-->
    <br>To see this work.
    </body>
    </html>
    ******************************************************************************

    The testinc.htm file:
    *******************************************************
    This is a test
    *******************************************************

    This is driving me nuts. I have other files that I use include files on
    with no problems. I have not been able to figure out why they work and this
    one doesn't.

    Thanks,

    Tom
    > --
    > Edwin van der Vaart
    > http://www.semi-conductor.nl/ Links to Semiconductors sites
    > http://www.evandervaart.nl/ Under construction
    tshad, Apr 25, 2005
    #8
  9. tshad

    mbstevens Guest

    mbstevens, Apr 25, 2005
    #9
  10. tshad

    tshad Guest

    "mbstevens" <> wrote in message
    news:Gtdbe.811$...
    > tshad wrote:
    >
    >> Here are 2 examples you can see:
    >> http://www.payrollworkshop.com/Samples/test.htm
    >> http://www.payrollworkshop.com/Samples/test2.htm

    >
    > I'm getting 404 errors on these.
    > Is the server set up to serve SSI on files that do not
    > have specially named extensions, such as .shtml?

    Nope.

    My mistake. For some reason they disappeared.

    I know they were there.

    Anyway, they're there now.

    Thanks,

    Tom
    > --
    > mbstevens http://www.mbstevens.com
    >
    tshad, Apr 25, 2005
    #10
  11. tshad

    tshad Guest

    tshad, Apr 25, 2005
    #11
  12. tshad

    mbstevens Guest

    tshad wrote:

    >
    > "tshad" <> wrote in message
    > news:CBdbe.492$...
    >> "mbstevens" <> wrote in
    >> message
    >>

    news:Gtdbe.811$...
    >>> tshad wrote:
    >>>
    >>>> Here are 2 examples you can see:
    >>>> http://www.payrollworkshop.com/Samples/test.htm
    >>>> http://www.payrollworkshop.com/Samples/test2.htm
    >>>

    >
    > BTW, I also tried change the File to Virtual to see if
    > that would work and it didn't.
    >
    > http://www.payrollworkshop.com/Samples/test3.htm
    > http://www.payrollworkshop.com/Samples/test4.htm
    >
    > Tom

    OK, so now rename test3.htm to test3.shtml
    test4.htm to test4.shtml

    ....and see if that works.
    --
    mbstevens http://www.mbstevens.com
    mbstevens, Apr 25, 2005
    #12
  13. tshad

    Phil A Guest

    tshad <> wrote in
    news:<PEdbe.493$>

    > BTW, I also tried change the File to Virtual to see if that would work
    > and it didn't.


    Maybe the people in the Microsoft server groups will have an answer for
    you. They may be fat, bald and ugly but they sure know their stuff.

    --
    Illegitimi non carborundum
    Phil A, Apr 25, 2005
    #13
  14. tshad

    Phil A Guest

    Edwin van der Vaart <> wrote in
    news:<lUcbe.2308$184.600@amstwist00>

    > > > Edwin van der Vaart

    > >
    > > Please tell me you have a short, chubby family member called Rafael.

    >
    > So sorry. Rafael isn't a member of mine family.
    > The family tree of Rafael van der Vaart comes from Rotterdam. Mine
    > family tree comes from Friesland (the Nothern part of the Netherlands).


    Oh well. Thanks anyway, Edwin.

    --
    Illegitimi non carborundum
    Phil A, Apr 25, 2005
    #14
  15. tshad

    tshad Guest

    "mbstevens" <> wrote in message
    news:%Ndbe.13413$...
    > tshad wrote:
    >
    >>
    >> "tshad" <> wrote in message
    >> news:CBdbe.492$...
    >>> "mbstevens" <> wrote in
    >>> message
    >>>

    > news:Gtdbe.811$...
    >>>> tshad wrote:
    >>>>
    >>>>> Here are 2 examples you can see:
    >>>>> http://www.payrollworkshop.com/Samples/test.htm
    >>>>> http://www.payrollworkshop.com/Samples/test2.htm
    >>>>

    >>
    >> BTW, I also tried change the File to Virtual to see if
    >> that would work and it didn't.
    >>
    >> http://www.payrollworkshop.com/Samples/test3.htm
    >> http://www.payrollworkshop.com/Samples/test4.htm
    >>
    >> Tom

    > OK, so now rename test3.htm to test3.shtml
    > test4.htm to test4.shtml
    >
    > ...and see if that works.


    I can't seem to get my web server to serve that extension up.

    I did try to open it from IE inside and it had the same result.

    BTW, why would shtml work different from htm?

    Thanks

    Tom
    Tom
    > --
    > mbstevens http://www.mbstevens.com
    >
    tshad, Apr 25, 2005
    #15
  16. tshad

    mbstevens Guest

    tshad wrote:

    > I did try to open it from IE inside and it had the same
    > result.
    >
    > BTW, why would shtml work different from htm?


    Servers are configured differently. Ask the admnistrator
    whether the server is set up to serve server side includes
    *at all*. If not, can s/he turn it on?

    If it is on, ask if it requires a .shtml extension
    or something similar before SSI can be used in a file.

    Some servers are set up to serve SSI on all files, some on
    only specially named files. So, get all that
    information.

    If they won't give you SSI, consider server side
    programming: Perl/CGI or
    PHP -- much more powerful and flexible anyway.

    If administrators also won't
    let you run server side programs, you can use a
    preprocessor to include files. There are dozens on the
    net. You can download mine at:
    http://www.mbstevens.com/preprocessor/

    HTH
    --
    mbstevens
    mbstevens, Apr 25, 2005
    #16
  17. tshad

    tshad Guest

    "mbstevens" <> wrote in message
    news:v3ebe.13417$...
    > tshad wrote:
    >
    >> I did try to open it from IE inside and it had the same
    >> result.
    >>
    >> BTW, why would shtml work different from htm?

    >
    > Servers are configured differently. Ask the admnistrator
    > whether the server is set up to serve server side includes
    > *at all*. If not, can s/he turn it on?


    I can turn it on if I could find it. I am not sure where it is (or if it is
    even an option).

    Can you use includes with html files, anyway?

    I am using IIS6 (IIS5 on an XP) and after it was mentioned to try changing
    the extension to shtml, I tried changing the extension to .aspx and it
    worked (which is what all my other pages were set as).

    What I was trying to do is set up some mechanism where my boss could use
    DreamWeaver and make changes to an include file to change the appearance of
    the pages without having to change all the pages.

    I was going to use include files (maybe I can't) to try to get this to work.

    I have tried templates with DW before, but templates have their problems,
    one that is a real problem in that you can't use the same template for html
    files and aspx files. DW wipes out the Page directive for aspx files. Very
    irritating.

    >
    > If it is on, ask if it requires a .shtml extension
    > or something similar before SSI can be used in a file.
    >
    > Some servers are set up to serve SSI on all files, some on
    > only specially named files. So, get all that
    > information.


    I will check that out. As I mentioned, I don't know where it would be.

    Thanks,

    Tom
    >
    > If they won't give you SSI, consider server side
    > programming: Perl/CGI or
    > PHP -- much more powerful and flexible anyway.
    >
    > If administrators also won't
    > let you run server side programs, you can use a
    > preprocessor to include files. There are dozens on the
    > net. You can download mine at:
    > http://www.mbstevens.com/preprocessor/
    >
    > HTH
    > --
    > mbstevens
    >
    >
    >
    >
    >
    >
    >
    tshad, Apr 25, 2005
    #17
  18. tshad

    Don Guest

    On 25 Apr 2005 Edwin van der Vaart wrote in alt.html

    > Mine
    > family tree comes from Friesland (the Nothern part of the Netherlands).


    So your family hasn't migrated out of the trees yet? My clan moved to the
    ground a long long time ago.

    --
    Don
    Don, Apr 26, 2005
    #18
  19. tshad

    SpaceGirl Guest

    tshad wrote:
    > I have the following file that I am trying to set up with 2 include files
    > that don't seem to open. I am running both on my XP and a Win2003 server
    > and get the problem in both places.
    >
    > I have tried this with both putting the include files in the same folder as
    > well as an external includes folder and I can't seem to get the files to
    > work.
    >
    > If I take the code out and put them directly in the file, it works fine.
    > The images work fine (if not being called from the include.inc file), so the
    > relative paths work fine.
    >
    > ******************************************************************************************************
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <title>:: Staffing Workshop ::</title>
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > <link href="../final-site/option2/css/staffing.css" rel="stylesheet"
    > type="text/css">
    > <style type="text/css">
    > <!--
    > body {
    > margin-top: 21px;
    > }
    > .style1 {
    > font-size: 18px;
    > font-weight: bold;
    > }
    > -->
    > </style>
    > </head>
    >
    > <body>
    > <!-- #include file="\header.inc" -->
    > <td width="587" height="308" align="left" valign="top"
    > background="../final-site/option2/images/table-bg.gif">
    > <table width="571" border="0" height="72">
    > <tr>
    > <td width="133" height="12"></td>
    > <td width="428" height="12"></td>
    > </tr>
    > <tr>
    > <td colspan="2" align="left" valign="top" height="12"></td>
    > </tr>
    > <tr>
    > <td colspan="2" align="left" valign="top" height="1"><blockquote
    > class="style1">Employer Overview</blockquote></td>
    > </tr>
    > <tr>
    > <td colspan="2" align="left" valign="top"
    > height="14"><blockquote>&nbsp;
    > </blockquote></td>
    > </tr>
    > </table>
    > </td>
    > <!-- #include file="\includes\footer.inc" -->
    > </body>
    > </html>
    > *******************************************************************************************************
    >
    > Thanks,
    >
    > Tom
    >
    >



    Under IIS, the page you are including the files INTO must be a .asp. The
    server only parses files with a .asp extension, so any other documents
    (.htm) that you have placed includes in are totally ignored. The files
    you are INCLUDING can have any extension, unless you want those to be
    processed too.
    SpaceGirl, Apr 26, 2005
    #19
  20. Don wrote:
    > On 25 Apr 2005 Edwin van der Vaart wrote in alt.html
    >
    >>Mine family tree comes from Friesland (the Nothern part of the Netherlands).

    >
    > So your family hasn't migrated out of the trees yet? My clan moved to the
    > ground a long long time ago.

    When? round 1700?
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
    Edwin van der Vaart, Apr 26, 2005
    #20
    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. vmmattil
    Replies:
    0
    Views:
    338
    vmmattil
    Feb 16, 2005
  2. Replies:
    0
    Views:
    889
  3. John Smith

    Header files included in header files

    John Smith, Jul 21, 2004, in forum: C Programming
    Replies:
    18
    Views:
    596
    Jack Klein
    Jul 24, 2004
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    882
    Andreas Bogenberger
    Feb 22, 2008
  5. Charles
    Replies:
    0
    Views:
    287
    Charles
    May 26, 2008
Loading...

Share This Page