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.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 3rd, 2007, 22:50
SuperMember

SuperMember
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.
Reply With Quote

  #2 (permalink)  
Old Apr 4th, 2007, 00: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 00:21.
Reply With Quote
  #3 (permalink)  
Old Apr 4th, 2007, 02:23
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
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.
Reply With Quote
  #4 (permalink)  
Old Apr 4th, 2007, 11:15
SuperMember

SuperMember
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.
Reply With Quote
  #5 (permalink)  
Old Apr 4th, 2007, 11:25
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
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...
Reply With Quote
  #6 (permalink)  
Old Apr 4th, 2007, 14: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.
Reply With Quote
  #7 (permalink)  
Old Apr 4th, 2007, 15:10
SuperMember

SuperMember
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
Reply With Quote
  #8 (permalink)  
Old Apr 4th, 2007, 22:01
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
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
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 20:54
Remove page number malambing57 Classic ASP 1 Oct 14th, 2004 08:47
page error number 2!! benbacardi Classic ASP 13 Sep 30th, 2004 14:03
Further Help with Includes freebirdnz Classic ASP 3 Aug 5th, 2004 13:48
Help with includes. freebirdnz Classic ASP 5 Aug 3rd, 2004 14:38


All times are GMT. The time now is 21:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43