Html include

J

John

Hello,


I have an html page and want to include and html menu that I use on
all pages. What is the best way to do this? A php include command?
 
B

Beauregard T. Shagnasty

John said:
I have an html page and want to include and html menu that I use on
all pages. What is the best way to do this? A php include command?

That is what I do.

include "/common/menu.php";

Mine is a php script because it does processing based on what page(s)
called it. If yours is a static menu, it can be pure HTML.
 
P

Paul Furman

Beauregard said:
John wrote:




That is what I do.

include "/common/menu.php";

Mine is a php script because it does processing based on what page(s)
called it. If yours is a static menu, it can be pure HTML.

In case John doesn't know...

<?
include "/common/menu.php";
?>
 
N

Nick Marks

I think you are getting it wrong... if you want to include it onto a
HTML page then you will have to do it manually ... Include will not
work on HTML pages.. Alternatively you can use frames or IFrames

For more help Email me
http://www.design2host.net
 
P

Paul Furman

Nick said:
I think you are getting it wrong... if you want to include it onto a
HTML page then you will have to do it manually ... Include will not
work on HTML pages.. Alternatively you can use frames or IFrames

Hmm, OK you are right!
A php file will parse html though and can include perhaps any extension
on a ascii file, so:

INDEX.PHP:
<html>
<head>... blah
<body>... blah
<?
include "menu.txt";
include "body.txt";
?>
</body>
</html>

Probably someone will have another solution.
 
B

Beauregard T. Shagnasty

Nick said:
I think you are getting it wrong...

You think /who/ are getting it wrong? You must be new here. Normally,
we quote the relevant part of the post we are replying to, as I am doing
here. Oh, you don't think this is *Google* do you?
if you want to include it onto a HTML page then you will have to do it
manually ...

There's another way?
Include will not work on HTML pages.. Alternatively you can use frames
or IFrames

Yes, you /are/ new here. Google for "frames are evil"
For more help Email me
hxxp://www.design2host.net

No thanks. Not if that is your best work. <lol>
<http://validator.w3.org/check?verbose=1&uri=http://www.design2host.net/>
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http://www.design2host.net/>
 
C

Chaddy2222

You think /who/ are getting it wrong? You must be new here. Normally,
we quote the relevant part of the post we are replying to, as I am doing
here. Oh, you don't think this is *Google* do you?


There's another way?


Yes, you /are/ new here. Google for "frames are evil"


No thanks. Not if that is your best work. <lol>
<http://validator.w3.org/check?verbose=1&uri=http://www.design2h...>
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&u...>
Ha, you reckon that's bad, I know of a bloke, well I presume it's a
bloke who keeps telling us (people who are new-ish to CSS to back to
HTML 3.2 as he / she / it thiks it (3.2) gives you more control then
what you get with CSS. But I thaught at the time it was the most
rediculous thing I had read. Oh and I stil do think that way about
HTML 3.2, I mean how can people still pay $50 per hour for old code
that will not work (as well) or at all on modern web browsers.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top