Reply
Using a single php include to include your page's header
Old 04-26-2008, 10:35 PM Using a single php include to include your page's header
Novice Talker

Posts: 12
Hey guys I recently got into PHP and after a little thinking I realized that with includes it would be possible to just have a single page with all the header information on it. What I mean by this is not just anything from <head> to </head>, but I have a navbar, and at least 20-30kb of code that never really changes from page to page and I just use a single include that links to that file instead of keeping all that code on every file. I am implementing it right now and I just wanted to ask you guys if this would cause any problems? Such as slower load times or anything like that before i implement it on my entire site (I already did a test page and it works fine). I dunno its just that its so god **** easy and saves me tons of trouble so there has to be some catch. If not then hell yea! Here is my site for those curious.

http://www.starcrafted.org
MikeRoweforpres is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-27-2008, 03:07 AM Re: Using a single php include to include your page's header
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
including files does not slow the script down, it does but to a verry small amount that is not felt by the user.

I would recomend to look into a template system, its better to use one, then to have the presentation side (HTML) mixed with PHP, its easyer for the coder and the designer when it comes to changing either parts ( design or back-end )
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Reply     « Reply to Using a single php include to include your page's header
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11812 seconds with 13 queries