Using a single Header/Side bar on multiple pages without Frames
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.
Megan posted this at 14:03 — 19th February 2007.
She has: 11,421 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.
Megan
Connect with us on Facebook!
aka Rohan posted this at 15:58 — 19th February 2007.
He has: 200 posts
Joined: Feb 2006
Sweeeet, thanks Megan
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?
andy206uk posted this at 21:36 — 19th February 2007.
He has: 1,758 posts
Joined: Jul 2002
XAMPP is a real easy way.
Andy
OldWelshGuy posted this at 20:54 — 19th February 2007.
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
Internet Marketing Consultancy - My SEO Agony Uncle Blog
aka Rohan posted this at 07:52 — 20th February 2007.
He has: 200 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.
I actually stumbled across that yesterday, does look pretty simple to install. I guess that's the way forward then. Cheers guys
aka Rohan posted this at 09:16 — 7th April 2007.
He has: 200 posts
Joined: Feb 2006
Which is best? Currently I'm using php includes, but should I be using server side includes instead?
demonhale posted this at 04:22 — 8th April 2007.
He has: 3,278 posts
Joined: May 2005
oh and you can use htaccess to let even html be read as php...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.