You are here: Re: Is there a more efficient way to do this? « PHP Programming Language « IT news, forums, messages
Re: Is there a more efficient way to do this?

Posted by Jerry Stuckle on 08/16/06 00:55

Chung Leong wrote:
> Rik wrote:
>
>>--page.php------------
>>include('head.html');
>>/* generate content */
>>include('foot.html');
>>----------------------
>
>
> Agh! Drives me crazy that people keep recommending this hamfisted
> method. Doing includes in lieu of calling function is a poor way to
> program. A page header or footer is not different from other
> functionalities in your application. To reuse it, wrap it in a
> function. Example:
>

Sorry, Chung, I agree with Rik on this one. This is an excellent way to
reuse the code. I use various incarnations of this (either in PHP or
using SSI) in a lot of code.

It sure is a lot better than trying to keep everything in one page.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация