You are here: Re: Making one HTML page from more than one file « HTML « IT news, forums, messages
Re: Making one HTML page from more than one file

Posted by Manfred Preuίig on 04/21/07 11:58

Hello, and thanks. I have some additional questions to it:
Toby A Inkster schrieb:
> Manfred Preußig wrote:
>
>> In 'C' this would be easy to do (just '#include <filename>' at the point
>> it is needed (it is recommended but not need to be at the file start))
>> but can I do it in HTML and if how?
>
> In pure HTML no, but there exist several different mechanisms for doing
> what you describe with server-side scripting languages. The simplest of
> these is languages is called "Server-Side Includes (SSI)" -- indeed, it is
> so basic that it can barely be called a scripting language. To include a
> file, you just use:
>
> <!--#include "filename.html"-->
This is to the html-file like a comment. Can I include it at every point
in the source? And what's about the result: It is like the code is in
the original file? What's about the code: Is this included file a
complete html-file (with html and body-tag and so on?)? And what's about
CSS? Where I have to set the outline? And the positions?
>
> Easy. However, you'll need to make sure that your server supports this
> feature. You don't need to worry about browser support for any particular
> server-side technology though -- just server support. As you appear to
> come from a C background, think of the server-side technology as being an
> odd compiler extension -- if you write code that uses the odd compiler
> extension, you only have to worry that your compiler supports the
> extension -- you don't need to worry if the people running the
> already-compiled program have a compiler that supports the extension.
>
> Better yet would be to learn PHP, which really is a full-blown programming
> language that can be embedded in web pages. Its syntax is much like C, but
> it's more abstract, so you don't need to worry about memory management and
> pointers and so on. Here's an example:
>
> <p class="sum">Here is a tricky sum:<br>
> <?php
> $i = 123;
> $j = 456;
> printf('%d + %d = %d', $i, $j, $i+$j);
> ?>
> </p>
>
> And here's how you include a file with PHP:
>
> <?php
> include "filename.html";
> ?>
>
Here are the questions the same as above.

The code I want to embed is the navigation bar of the page so the
contents have to make changes to the presentation. But the only change
is the change of the file in an iframe so possibly this can be shifted
to the embedded file to make it work.

So again many thanks for this allready here. I ask my provider for
features his site have. Wait and see what I can use there.

greetings

ManfredP

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация