Reply to RE: [PHP] On large application organization [long and possibly boring]

Your name:

Reply:


Posted by Richard Lynch on 01/07/05 18:44

> Just out of curiosity, a lot of people had answers to this question, but
> I couldn't find a shred of evidence in the
> documentation. Did you do similar tests, hear from gurus, or something
> of like? Or did I just miss it somewhere?

Once upon a time, a long time ago, require and include were different.

In fact, they were different in exactly the way being discussed, only more
so.

'require' would be loaded *ONCE* when the script got there, and the values
within the file required would be whatever they were upon that first load.

'include' would be "re-loaded" each time it was reached.

This cause all manner of confusion, and somewhere around version 3 or 4,
was abandoned.

The only difference now is that require signals an ERROR and include only
a WARNING.

In either case, if your require/include is inside a conditional, it will
NOT be "seen" by PHP until that line of code is executed.

This is the way 'include' worked, and the way most people who were
confused in earlier versions though 'require' "should" have worked. Now
it does.

--
Like Music?
http://l-i-e.com/artists.htm

[Back to original 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

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