

![]() |
| ![]() | |||||||
|
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| DNF Member Last Online: Yesterday 04:35 PM iTrader: (28) Join Date: Mar 2004
Posts: 383
DNF$: 1,751 Location: Boston, MA | HTML/PHP advice needed. I am wondering, what is the best way to design a website that has some areas of static content that show up on each page such as a site navigation menu or a page footer that contains a disclaimer and links? The information on the menu and footer would never change from page to page, only the rest of the page content. From my understanding, I want to stay away from frames. So how would I go about doing this? Should I put the menu and footer in spererate php files and use includes on each page to call them in? Or is there another way to go about this. I just want to make sure I get most of this right so I don't have to 1 day open up 500 files just to make a minor change to the dislaimer or copyright info on each page. Your help is greatly appreciated. Example are helpful if possible. Thanks.
__________________ NewsForum.com - General Discussion Forum FightForum.com - MMA, Boxing, UFC, and More - Discuss Boxing and MMA. |
| | |
| Sponsored Ads |
| | #2 (permalink) |
| DNF Regular Name: Bruce Last Online: 11-08-2009 12:15 AM iTrader: (3) Join Date: Jan 2005
Posts: 627
DNF$: 4,609 Location: Winnipeg Canada
Country: | Re: HTML/PHP advice needed. Php includes for the header and footer are probably your easiest and fastest way to get this job done. You could have a 50,000 page site, 1 header, 1 footer and it's simple to change the layout/menu once and be done with it. An example page is below. Page is named index.php <!DOCTYPE><html><head><title>title goes here</title> <? include('head.txt') ?> put your body html here <? include('foot.txt') ?> head.txt would just contain the rest of your header, the main menu and opening tables etc. foot.txt would contain the closing tables and bottom of your page.
__________________ http://www.pocketbikeforum.com - Pocketbikes http://www.indexusupport.com - Support, mods, tips and databases http://www.gowinnipeg.ca - Winnipeg online directory |
| | |
| | #3 (permalink) |
| DNF Member Last Online: Yesterday 04:35 PM iTrader: (28) Join Date: Mar 2004
Posts: 383
DNF$: 1,751 Location: Boston, MA | Re: HTML/PHP advice needed. Thanks for the reply. I was thinking along those line but just wasn't sure. I guess I am confident enough to go mess around with it now. Wish me luck =)
__________________ NewsForum.com - General Discussion Forum FightForum.com - MMA, Boxing, UFC, and More - Discuss Boxing and MMA. |
| | |
| | #4 (permalink) |
| DNF Regular Name: Bruce Last Online: 11-08-2009 12:15 AM iTrader: (3) Join Date: Jan 2005
Posts: 627
DNF$: 4,609 Location: Winnipeg Canada
Country: | Re: HTML/PHP advice needed. Good luck ![]() One thing you may need to know, depending on your system you may have to include the path to the include. Try not to use the URL to the include however even though that may be easier. /home/username/public_html/folder/head.txt (or whatever your path is) is the best.
__________________ http://www.pocketbikeforum.com - Pocketbikes http://www.indexusupport.com - Support, mods, tips and databases http://www.gowinnipeg.ca - Winnipeg online directory |
| | |
| | #5 (permalink) |
| Platinum Lifetime Member Last Online: 11-23-2008 10:57 PM iTrader: (2) Join Date: Sep 2003
Posts: 127
DNF$: 810 Location: Mobile, AL (USA) | Re: HTML/PHP advice needed. The first time I ever tried to create repeating elements in a web site, I really screwed up and used a JavaScript file. Since learning a bit of PHP, I'll never go back to the old way of doing things again. Good luck. --- C0113c70r |
| | |
| | #6 (permalink) |
| Platinum Lifetime Member Name: Darren Last Online: 10-22-2009 06:07 PM iTrader: (14) Join Date: Sep 2003
Posts: 1,896
DNF$: 2,403 Location: California, US
Country: | Re: HTML/PHP advice needed. Hi, I suggest using <?php include "file.php"; ?> instead as ) is not really needed.
__________________ Zend PHP5 Certified Engineer - If you have a great domain name let me be the one to develop it. |
| | |
| | #8 (permalink) | |
| Platinum Lifetime Member | Re: HTML/PHP advice needed. imho, the best way to have a PHP template so to speak is to make your repeatable page... name it "template.htm", and put "##content##" where you want the changing content to be.... then you can make each individual page as another file "aboutus.htm". Then on a PHP page you can do this: Quote:
| |
| | |
| | #10 (permalink) |
| Platinum Lifetime Member Name: Darren Last Online: 10-22-2009 06:07 PM iTrader: (14) Join Date: Sep 2003
Posts: 1,896
DNF$: 2,403 Location: California, US
Country: | Re: HTML/PHP advice needed. Ah mike that is not really a good way... just make it use an OOP template parser...
__________________ Zend PHP5 Certified Engineer - If you have a great domain name let me be the one to develop it. |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Advice Needed - Been contacted by PI Firm | siaver | Domain Name Appraisal Discussion | 29 | 04-19-2005 08:30 PM |
| How to protect your claim to domains? Advice needed! URGENT! | Collector | Domain Name Legal Issues | 5 | 11-26-2004 08:48 AM |
| Used a copyrighted image :-( advice needed if possible | laskos | Domain Name Legal Issues | 21 | 04-03-2004 09:16 AM |
| Advice Needed | dotcom | Adult Domain Appraisals and Adult Website Discussions | 1 | 07-23-2003 12:30 PM |
| Proper Sound Advice Needed About .ltd.uk's | DRPiNG | Domain Name Appraisal Discussion | 2 | 10-11-2002 06:49 AM |