View Full Version : Help with shtml
G-Zus
05-11-2003, 07:33 PM
http://galileo.spaceports.com/~aspenair/ssi.shtml
that is my companies webpage.
I am trying to use shtml to put a menu at the bottom of the page.
Can someone check out the source code and tell me what I am doing wrong?
the menus adress is http://galileo.spaceports.com/~aspenair/bottom.shtml
Thanks in advance,
Jeff Jensen
pardicity3
05-11-2003, 07:39 PM
Does spaceports support Server Side Includes? It looks as though they support php though...why not try this:
<?php include "bottom.shtml"; ?>
instead of your SSI declaration?
G-Zus
05-11-2003, 07:47 PM
i copied and pasted it onto the page and it didn't work.
do I need to change the format from .shtml to .html?
thanks for the reply
pardicity3
05-11-2003, 08:55 PM
<edit>
Bah! I typed out this whole long post--which is still very relevant and should be read--and then I realised your problem is very simple. You need to rename your page--the one that you have the include on, not the one you are including (although you can change that one too if you like)--to .php instead of .shtml.
</edit>
I should have noticed this before, but your problem is that you are trying to put a whole other complete page within an already complete page. You have a start and ending body tag and html tag in both documents. This is not needed.
When you are including something, you are not putting a whole other page in, you are merely putting a section of a page in. For example, if this were my page:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<div>This is some content that might
change frequently and that I want to
include from a seperate file!!</div>
</body>
</html>
Now if I wanted to put that div into the page using some sort of include, I would do the following:
(Main page)
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<?php include "myfile.txt"; ?>
</body>
</html>
(myfile.txt)
<div>This is some content that might
change frequently and that I want to
include from a seperate file!!</div>
Notice how the page that I am including doesn't have a whole other set of <body> and <html> tags? I would assume this is where you are experiencing problems. Hopefully this helps.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.