|
Posted by Peter Fox on 11/17/06 10:17
Following on from Jerry Stuckle's message. . .
>windandwaves wrote:
>> Hi gurus
>>
>> I have a class from which I create an object. I want this object to be
>> available in all my functions for my application. Basically, I want to
>> make the object global. What is the best way to do this?
>>
>> Thank you
>>
>> Nicolaas
>>
>
>Like any other variable. Pass it as a parameter to the functions
>(highly recommended) or make it global (not recommended).
>
Or stick it in $_SESSION. If you do that then make sure you understand
the PHP version of variable/pointers/references and the use of &.
--
PETER FOX Not the same since the bookshop idea was shelved
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Navigation:
[Reply to this message]
|