By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

Why didn't the include work?

P: n/a

<html><head>
<link rel="stylesheet" type="text/css" href="style.css">
<script language="javascript" src="digits.js"></script>
</head><body>
<div id="topbar">
<h1>TOP BAR</h1>
<div class="barmnu">
<!--#include "top.html" -->
</div>
</div>
<div id="Content">
<p><!--#echo var="DATE_LOCAL" -->
<p><!--#include file="haha.html" -->
</div>
<div id="sbr">
<h5>ITEM 3</h5>
<div class="sbrbox">
<p><!--#include file="sidebar.html" -->
<p>Visitors:&nbsp;<script>shownumber("123");</script>
</div>
</div>
</body></html>
--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.20.4
^ ^ 20:11:01 up 13 days 7:23 1 user load average: 1.16 1.05 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
Apr 6 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Scripsit Man-wai Chang:
<html><head>
Instead of throwing a bulk of markup at the public's face, please phrase
your question (Subject line is for telling about the message, not part of
the message) and illustrate it with a URL. Note that "didn't work" is
roughly as informative as it would be to tell a doctor "I have a problem".
And use US-ASCII when posting to international groups; your message headers
specify Big-5 for no good reason.

Also please note that this group is about HTML. The include directive is not
part of HTML.
<!--#include "top.html" -->
That directive corresponds to common SSI syntax. So the odds are that your
server does not support SSI, or has the support disabled (though it's
possible that you just mistyped the file name, e.g. "top.html" instead of
"TOP.HTML"). Contact the server administrator.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 6 '07 #2

P: n/a
On 2007-04-06, Man-wai Chang wrote:
>
<html><head>
<link rel="stylesheet" type="text/css" href="style.css">
<script language="javascript" src="digits.js"></script>
</head><body>
<div id="topbar">
<h1>TOP BAR</h1>
<div class="barmnu">
<!--#include "top.html" -->
<!--#include file="top.html" -->

Or:

<!--#include virtual="top.html" -->

></div>
</div>
<div id="Content">
<p><!--#echo var="DATE_LOCAL" -->
<p><!--#include file="haha.html" -->
</div>
<div id="sbr">
<h5>ITEM 3</h5>
<div class="sbrbox">
<p><!--#include file="sidebar.html" -->
<p>Visitors:&nbsp;<script>shownumber("123");</script>
</div>
</div>
</body></html>


--
Chris F.A. Johnson <http://cfaj.freeshell.org>
========= Do not reply to the From: address; use Reply-To: ========
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Apr 6 '07 #3

P: n/a
The file containing the <!--includemust be marked on the server as
executable. I generally mark such files executable "by all".

--
David E. Ross
Climate: California Mediterranean
Sunset Zone: 21 -- interior Santa Monica Mountains with some ocean
influence (USDA 10a, very close to Sunset Zone 19)
Gardening pages at <http://www.rossde.com/garden/>
Apr 6 '07 #4

P: n/a

thank you all for the replies.

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
^ ^ 17:42:01 up 33 min 0 users load average: 1.02 1.14 1.19
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
Apr 7 '07 #5

P: n/a

My fault.. the Apache2 of Ubuntu was configured to allow SSI. Need to
edit /etc/apache2/apache2.conf.

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
^ ^ 16:08:01 up 1 day 22:59 1 user load average: 1.01 1.04 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
Apr 9 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.