include files not being included

T

tshad

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
 
E

Edwin van der Vaart

tshad said:
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 "\"
 
A

Arne

Once said:
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.
 
T

tshad

Edwin van der Vaart said:
tshad said:
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
 
E

Edwin van der Vaart

Phil said:
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).
 
E

Edwin van der Vaart

tshad said:
tshad said:
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 "/".
 
T

tshad

Edwin van der Vaart said:
tshad said:
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
 
T

tshad

mbstevens said:
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
 
P

Phil A

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.
 
P

Phil A

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.
 
T

tshad

mbstevens said:
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
 
M

mbstevens

tshad said:
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
 
T

tshad

mbstevens said:
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
 
D

Don

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.
 
S

SpaceGirl

tshad said:
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.
 
E

Edwin van der Vaart

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


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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top