Re: global and object

From: Date: Sat, 19 Mar 2005 18:56:53 +0000
Subject: Re: global and object
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211111@lists.php.net to get a copy of this message
Oops, sorry for double posting. my mistake. accept my apologies :-p On Fri, 18 Mar 2005 23:51:15 +0000, pooly <pooly7@gmail.com> wrote: > Hi, > > I'm trying to use a global object (declared at a upper level), but all I > got is : > Call to a member function on a non-object in > /home/pooly/public_html/templeet/modules/freedb.php on line 16 > > part of the code is : > $freedb =& new freedbaxs(); > Function return_freedb_search($array) > { > global $freedb; > [snip] > $freedb->freedb_search($txt); > > so, can I access an object allocated outside a function ? this > functionis meant to be a wrapper for that class, because I cannot access > directly. > thanks for you help, > > -- > Pooly ;) > http://www.w-fenec.org/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#211111) next »