HTML Include command?

A

Aaron Reimann

To my knowledge, there isn't a way to do it without stuff like iframe
and what not. Does your hosting provide PHP support? If so:

<?php include("page2.php"); ?>
 
B

Brian Cryer

Jackmac said:
Hi all,

Hopefully a simple solution to this problem.

I want to use some common elements in my web pages but want to store them
centrally so I only need to change one file instead of multiple.

I use it in programming just now so am sure it can be done.

I have say a file page1.html which is standard text, and I wwant to
include the information on page2.html in the middle section. Is there a
way I can say:

Call or Include page2.html

If I strip out all the head and body tags, surely I should be able to put
this in?

Anyone any ideas?

TIA

Jackmac

There isn't an html include. (I wish there was!)

See if your server supports server side includes, I think that might give
you what you are after (but I've not used them, so could be wrong).

An alternative would be to use JavaScript, to generate the common content.
The trouble with this is that you can't rely on everyone having JavaScript
enabled.

Hope this helps.
 
W

wd

Hi all,

Hopefully a simple solution to this problem.

I want to use some common elements in my web pages but want to store them
centrally so I only need to change one file instead of multiple.

I use it in programming just now so am sure it can be done.

I have say a file page1.html which is standard text, and I wwant to include
the information on page2.html in the middle section. Is there a way I can
say:

Call or Include page2.html

If I strip out all the head and body tags, surely I should be able to put
this in?

Anyone any ideas?

The easiest way is with PHP:
http://tips.webdesign10.com/index.php?p=php-mysql-resources

You can use the "include" statement.
 
J

Jackmac

Hi all,

Hopefully a simple solution to this problem.

I want to use some common elements in my web pages but want to store them
centrally so I only need to change one file instead of multiple.

I use it in programming just now so am sure it can be done.

I have say a file page1.html which is standard text, and I wwant to include
the information on page2.html in the middle section. Is there a way I can
say:

Call or Include page2.html

If I strip out all the head and body tags, surely I should be able to put
this in?

Anyone any ideas?

TIA

Jackmac
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top