error when using $this

From: Date: Fri, 22 Aug 2003 00:07:50 +0000
Subject: error when using $this
Groups: php.general 
Request: Send a blank email to php-general+get-160370@lists.php.net to get a copy of this message
First of all, let me say that I am using PHP 5, but not including any new php5 features, just installed it. Anyway, this is the offending code.. $retVal = true; $this->setDBConn(mysql_connect('localhost',$this->_dbuser,$this->_dbpwd)); if ($this->getDBConn() == false) $retVal = false; and on my page I get the following error: Fatal error: Using $this when not in object context in /var/www/xxxxx Now this is code I've used time and time before...also, I have never seen an error such as the above. Any ideas?

« previous php.general (#160370) next »