Try this:
?php
class PropertyMgmt
{
function PropertyMgmt() {
global $complexes; /* yes I know using globals is dangerous, I
will fix this soon! :-) */
}
public function get_complexes() {
/* null */
}
} // end class
--
João Cândido de Souza Neto
TransientSeeker gritswa...@hotmail.com escreveu na mensagem
news:29494740.p...@talk.nabble.com...
Greetings,
I'm having a very simple problem that I can't seem to find the solution
to.
I try and access a method in this class I made called
MyPropertyManagement... the method is named get_complexes(). I try and
strip down the entire class to just focus on this problem with the hopes
of
it making things simple enough that the error will become apparent, but
unfortunately it has not. I am able to make a new instances of this
class,
add in some other methods and run/use them just fine. For some reason
this
method keeps erroring out saying it is undefined. I don't understand why?
Can someone please shed some light on this subject please?
The error is: Fatal error: Call to undefined method
PropertyMgmt::get_complexes() in /usr/www/test/test2.php on line 6
The files are as follows:
/*** /usr/www/test/inc/class/PropertyManagement.class.php
***/
?php
class PropertyMgmt
{
function PropertyMgmt() {
global $complexes; /* yes I know using globals is dangerous, I
will fix this soon! :-) */
}
public function PropertyMgmt::get_complexes() {
/* null */
}
} // end class
/*** /usr/www/test/test2.php ***/
?php
require_once('/usr/www/test/inc/class/PropertyMgmt.class.php');
$PM = new PropertyMgmt();
$PM-get_complexes();
die();
/* end test2.php /
Thank you in advance...
-
___
PHP 5.3.3
Apache 1.3.37
MySQL 5.0.24a
FreeBSD 6.2-PRERELEASE
--
View this message in context:
http://old.nabble.com/Fatal-error%3A-Call-to-undefined-method-tp29494740p29494740.html
Sent from the PHP - General mailing list archive at Nabble.com.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php