FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Is there any situation where anything other than require_once is better?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Is there any situation where anything other than require_once is better? [message #171930 is a reply to message #171928] Fri, 21 January 2011 17:48 Go to previous messageGo to previous message
Leonardo Azpurua is currently offline  Leonardo Azpurua
Messages: 46
Registered: December 2010
Karma:
Member
"Michael Fesser" <netizen(at)gmx(dot)de> escribió en el mensaje
news:1pfjj654tr4oeo45u6dkhu2lqqbto6r203(at)mfesser(dot)de...
> .oO(Leonardo Azpurua)
>
>> [require vs. require_once]
>>
>> But now I am going to start coding classes, and if they are going to
>> be completely context independent, they must declare their own
>> dependencies as "require" statements.
>>
>> And I guess "require_once" is the natural choice for this situation.
>
> In case of classes there's another very convenient option:
> autoloading.
>
> Have a look at __autoload() or better spl_autoload_register().

Great advice. Thanks!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Syntax for trim charlist?
Next Topic: SNMPv3 for PHP?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 21:57:32 GMT 2024

Total time taken to generate the page: 0.03793 seconds