Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > include files not being included

Reply
Thread Tools

include files not being included

 
 
tshad
Guest
Posts: n/a
 
      04-25-2005
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


 
Reply With Quote
 
 
 
 
Edwin van der Vaart
Guest
Posts: n/a
 
      04-25-2005
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
 
Reply With Quote
 
 
 
 
Phil A
Guest
Posts: n/a
 
      04-25-2005
Edwin van der Vaart <(E-Mail Removed)> 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
 
Reply With Quote
 
Arne
Guest
Posts: n/a
 
      04-25-2005
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.
 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      04-25-2005
"Edwin van der Vaart" <(E-Mail Removed)> 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



 
Reply With Quote
 
Edwin van der Vaart
Guest
Posts: n/a
 
      04-25-2005
Phil A wrote:
> Edwin van der Vaart <(E-Mail Removed)> 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
 
Reply With Quote
 
Edwin van der Vaart
Guest
Posts: n/a
 
      04-25-2005
tshad wrote:
> "Edwin van der Vaart" <(E-Mail Removed)> 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
 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      04-25-2005
"Edwin van der Vaart" <(E-Mail Removed)> wrote in message
news:I5dbe.2310$184.1439@amstwist00...
> tshad wrote:
>> "Edwin van der Vaart" <(E-Mail Removed)> 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



 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      04-25-2005
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?
--
mbstevens http://www.mbstevens.com

 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      04-25-2005
"mbstevens" <(E-Mail Removed)> wrote in message
news:Gtdbe.811$(E-Mail Removed) k.net...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
file included with jsp:include doesn't get parameters ittay.dror@gmail.com Java 0 12-07-2005 12:48 AM
problem: cannot write out an XML file without DTD being included vmmattil Java 0 02-16-2005 09:29 AM
Include file in another included file Vojma ASP General 6 12-02-2003 11:00 AM
Dynamic Include Page? Change what's included as mouse moves? Mr B Javascript 7 09-23-2003 04:56 AM



Advertisments