justuptime.com - monitor your servers & websites

Using a single Header/Side bar on multiple pages without Frames

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
Monkeyboy's picture

He has: 199 posts

Joined: Feb 2006

Is there a way I can have a header and sidebar that is called up on every page from a single location in html without resorting to frames?

At the moment if i ned to make a change to my sidebar say, I have to go through every page in turn making said change which is tedious at best.

J's World Welcome to my world

Megan's picture
Administrator

She has: 10,037 posts

Joined: Jun 1999

There are two ways to do this - server side includes or PHP. I forget what the SSI syntax is but you can look it up. For PHP it just looks like this:

<?php
include "yourfile.html";
?>

'

Of course, now all your files need to have .php extensions.

Monkeyboy's picture

He has: 199 posts

Joined: Feb 2006

Sweeeet, thanks Megan Laughing out loud

Is there a simple way/program for viewing .php pages without php installed. In otherwords on my home PC without having to upload them to the server?

J's World Welcome to my world

andy206uk's picture
DeveloperModerator

He has: 1,742 posts

Joined: Jul 2002

Monkeyboy;215447 wrote: Is there a simple way/program for viewing .php pages without php installed. In otherwords on my home PC without having to upload them to the server?

XAMPP is a real easy way.

Andyk

Music Rants News and Reviews | My Photoblog | Blog of a Web Designer
Give a man a fish and you feed him for a day. Teach him to use the Net and he won't bother you for weeks.

They have: 64 posts

Joined: Apr 2006

Yes you can get a combined apache mysql server set up that will install on your machine and parse the pages nicely for you.

But I am buggered if I can remember the name of the script Sad

Monkeyboy's picture

He has: 199 posts

Joined: Feb 2006

Ah ok, so I guess the only way is to install server software. I was hoping there might be a php editor type program which could emulate a server running php but hey ho.

andy206uk;215464 wrote: XAMPP is a real easy way.

I actually stumbled across that yesterday, does look pretty simple to install. I guess that's the way forward then. Cheers guys Smiling

J's World Welcome to my world

Monkeyboy's picture

He has: 199 posts

Joined: Feb 2006

Megan;215441 wrote: There are two ways to do this - server side includes or PHP.

Which is best? Currently I'm using php includes, but should I be using server side includes instead?

J's World Welcome to my world

demonhale's picture

He has: 3,195 posts

Joined: May 2005

oh and you can use htaccess to let even html be read as php...