View Full Version : How to do bio.php instead of index.php?p=bio.php
Anonymous
01-12-2003, 11:41 PM
I'm using php on my site so that I can have a main template (index.php), but I change the open area on my site (for a blog, about me, archives, etc...). I asked a friend why I use the index.php?p=bio.php instead of some friends who simply use bio.php (and achieve the same results) and he said that I was using a "get" line instead of SSI (server side includes). Is he right? What can I do?
Cheers.
eugene
01-13-2003, 04:04 AM
Could you give more details. It may be software specific. Private message me.
dbmasters
01-13-2003, 09:07 AM
yes, you are using a "get". $_GET to be exact. Is it a problem? I am guessing the index.php page holds the "wrap-around" design and the $_GET["p"] just tells the index.php file to include the contents of bio.php into the main area of the body. Not a big deal, either way works.
So actually, you are using a $_GET to populate a server side include. Therefore, you are using both get and SSI.
Anonymous
01-14-2003, 09:51 PM
I'm trying to make the URL for the page a little less messy. I have the main template as index.php. Is it possible to change the bio.php or the index.php code so that instead of having to do:
index.php?p=bio.php
I can simply do this:
bio.php
Cheers,
Mike
dbmasters
01-16-2003, 09:34 AM
yes, take index.php apart cut it into a header, footer and main content area. Then make the header and footer into two .php files. header.php and footer.php.
Now, in every page of your site just add <?php include("header.php"); ?> and <?php include("footer.php"); ?> at the top and bottom of each main content area of the page. Then you can change the template by just changing those two files but still retain simpler URLs.
eugene
01-16-2003, 09:59 AM
Cute, Dan, cute.
dbmasters
01-17-2003, 01:59 PM
Whaddya mean, cute? :? Am I wrong here somewhere, other than making it sound easy than it might really be for a noob?
eugene
01-18-2003, 01:00 PM
No, Dan. It is a good answer and totally on the ball. The only problem occurs when a person wants to upgrade or apply a patch ... then they need to do some more work. I LOVE your solution!
eugene
01-18-2003, 01:02 PM
LOL. Sorry, Dan, I really couldn't help myself with the "totally on the ball" comment ... :)
dbmasters
01-18-2003, 01:15 PM
LOL. Sorry, Dan, I really couldn't help myself with the "totally on the ball" comment ... :)
:D
Powered by vBulletin™ Version 4.0.3 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.