Right.  There are several advantages to using included files.   You can
write routines that you're going to use repeatedly and just include the file
with the code, instead of re-inventing the wheel, as they say.

Consistency is another advantage.  So, if you design your header, sidebar
and footer and just include them then you don't need to edit every stinking
page on your site when you want to make a change.

There's a handful of include-type statements.  Include, include_one,
require, require_once, etc.  I'd read about those four before making a
choice about which to use.

On Sun, Mar 8, 2009 at 12:06 PM, Gary <gwp...@ptd.net> wrote:

> I'm working on learning php and have been toying with includes, and I am
> trying to figure the advantages/disadvantages to using them.
> I know that using them eliminates the need to "put" the files once altered
> as with a template, however, is that the only advantage.
> My particular concerns are with SEO and if the search engines and the bots
> can read the page if it is made completely on includes?
> Any and all comments would be appreciated.
> Gary
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to