Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

number of php includes on one page?

This is a discussion on "number of php includes on one page?" within the PHP Forum section. This forum, and the thread "number of php includes on one page? are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Apr 3rd, 2007, 23:50
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
number of php includes on one page?

Is there a safe number of php includes you can use in anyone web design?
Is it safe to use it for
1)header
2)navigation
3)footer
if all pages are alike?

How does using php include effect SEO if you place your text navigation in the php file?

I have finally stopped procrastinating and begun to implement this to cut down on updates on large sites. However, I really don't know much about it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Apr 4th, 2007, 01:18
BGarner's Avatar
Reputable Member
Join Date: Oct 2006
Location: In front of the computer.
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

The includes are all done by the server so the generated code is XHTML still. I don't believe it effects SEO or any other aspect of your site for this reason.

Look at the source of http://www.ldstroop21.org/. That code is full of php includes, but you would never know it.

I guess it's possible to have soooooo many includes that you just freak your server out, but that would be hard to do.

Last edited by BGarner; Apr 4th, 2007 at 01:21.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Apr 4th, 2007, 03:23
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

You can use a ton of includes. Includes themselves won't affect SEO, but content structure may.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Apr 4th, 2007, 12:15
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

Thanks Guys! I was most concerned about SEO but since the include pages are "there"... it makes sense that it won't be effected.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Apr 4th, 2007, 12:25
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

No problem Google sees websites just as your browser does...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Apr 4th, 2007, 15:56
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

Summary: I just started running at the mouth, so I put this at the top because it's what you want to know.

I wouldn't go as far as Ryan, but don't worry about a couple of dozen includes. They are almost identical to having the code written right on the page.
---------------------

Aye, afaik you can have unlimited includes in the theoretical sense that you can have unlimited html. You certainly shouldn't strain your server with 100 or so. Apache collects the file in milliseconds, and the rest of the function just has to make it visible to the server in the correct format -- barely more than the Windows "paste" function.

As far as SEO, all the people I have heard interviewed swear that the spiders basically look at the rendered page just like an html page, only giving consideration to not clogging the site. This may be problematic as far as links with $_GET variables goes, . . . getting off the subject here.

SEO spiders see the site after the includes are included, and any commands inside them have run. Having an include (or a dozen or two includes) is mostly the same as having the code written on the page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Apr 4th, 2007, 16:10
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

Thanks Mason.. excellent info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Apr 4th, 2007, 23:01
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: number of php includes on one page?

Yep, I agree. I can't imagine a scenario where someone would need 100 includes, though
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
php and seo, php include

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Includes lesleindotcom PHP Forum 3 May 31st, 2006 21:54
Remove page number malambing57 Classic ASP 1 Oct 14th, 2004 09:47
page error number 2!! benbacardi Classic ASP 13 Sep 30th, 2004 15:03
Further Help with Includes freebirdnz Classic ASP 3 Aug 5th, 2004 14:48
Help with includes. freebirdnz Classic ASP 5 Aug 3rd, 2004 15:38


All times are GMT. The time now is 13:43.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8