RE: Re: PHP includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gary
> 
> Thank you to everybody that replied...but it almost seems it is making
extra 
> work.
> 
> I can understand using an include for a menu, since they tend to
change 
> often and it is on every page, but the normal content I am not
understanding 
> the benefit.  If I have a page that has unique content on it, that is
to say 
> no other page has this content, why would I want to create a separate
file 
> to be included on the page, why would I not simple put the content
directly 
> on the page itself?
> 
> What is the best type of file to be used as an include (.txt, .php).
> 

We include template files for the <head> block, a banner across the top
of every page, the footer across the bottom, the menu and images in the
left sidebar, and the advertisement banners across the top and bottom.
Even the core section of each page is included from the initial file.
That way we can change the appearance, or modify the links to our
disclaimers and help files just once and every page gets updated. We
also have configuration flags to prevent some of those files from being
included in a specific virtual domain, so our clients can provide their
own templates instead of using ours.

File extensions for includes are up to you. Just make sure your
IDE/Editor know that they are PHP files. We use .lia for the libraries
of functions we use throughout the site. None of our files have .php as
the extension.

Bob McConnell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux