Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Include statement

Reply
Thread Tools

Include statement

 
 
RA
Guest
Posts: n/a
 
      06-27-2003
I am trying to use the 'include' statement to include code from another
file. The syntax that my book gives for it : <!--#include
file="file.htm"--> does not produce any results. The code looks like a
comment anyway, so I don't understand how that's supposed to work. I have
the same menu on every page and just want to code it once and then include
it in each page so I don't have to go through and change every page when I
change something in the menu. Anyone else have any luck with it? Thanks!


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      06-27-2003
"RA" <(E-Mail Removed)> wrote:

>I am trying to use the 'include' statement to include code from another
>file. The syntax that my book gives for it : <!--#include
>file="file.htm"--> does not produce any results. The code looks like a
>comment anyway, so I don't understand how that's supposed to work. I have
>the same menu on every page and just want to code it once and then include
>it in each page so I don't have to go through and change every page when I
>change something in the menu. Anyone else have any luck with it? Thanks!


Have you checked that your server supports includes?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-27-2003
RA wrote:

> I am trying to use the 'include' statement to include code from another
> file. The syntax that my book gives for it : <!--#include
> file="file.htm"--> does not produce any results. The code looks like a
> comment anyway, so I don't understand how that's supposed to work.


It is an SSI directive.
Your webserver software must be configured to look for SSI directives on the
page. It will then include the file and send the combined file to the
client.

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
 
Reply With Quote
 
Lorne Cameron
Guest
Posts: n/a
 
      06-27-2003
I have also been looking into SSI for pretty much the same reason. So
I've been trying out a few things and it works great once uploaded to my
server. But when I try to view the local copy of the page the "include"
parts aren't displayed. I'm assuming this is normal behaviour due to
the nature of SSI, but is there any way around this so that I can see
what my pages will really look like before uploading them?

Thanks.
LC.

 
Reply With Quote
 
Isofarro
Guest
Posts: n/a
 
      06-27-2003
Lorne Cameron wrote:

> But when I try to view the local copy of the page the "include"
> parts aren't displayed. I'm assuming this is normal behaviour due to
> the nature of SSI, but is there any way around this so that I can see
> what my pages will really look like before uploading them?


Install a webserver locally.


--
Iso.
FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
Recommended Hosting: http://www.affordablehost.com/
Web Standards: http://www.webstandards.org/
 
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
if statement that, when false, skips first statement in its block, executes second? Jay McGavren Java 11 01-16-2006 05:49 PM
How do I do a conditional statement in a constant statement? tkvhdl@gmail.com VHDL 3 12-16-2005 06:13 PM
exec "statement" VS. exec "statement in globals(), locals() Ted Python 1 07-22-2004 08:51 AM
exec "statement" VS. exec "statement" in globals(), locals() tedsuzman Python 2 07-21-2004 08:41 PM



Advertisments