Re: require/include using a class ...

From: Date: Tue, 25 Jul 2000 13:52:34 +0000
Subject: Re: require/include using a class ...
Groups: php.general 
Request: Send a blank email to php-general+get-8038@lists.php.net to get a copy of this message
Hey: First of all, I stuck your code, verbatim, into a file and ran it. The following error came up: Fatal error: mysql is already a function or class in g:\webroot/ideasphp/test.htm on line 5 So, I renamed the name of the class from mysql to Oggle and got the following error: Parse error: parse error in g:\webroot/ideasphp/test.htm on line 40 Thus, your line: if($mysql_select_db($dbase,$conn) Needs to be modified, replacing the $ before mysql with ! and adding a parens at the end. if(!mysql_select_db($dbase,$conn)) I don't know why you're performing this step: $server = $this->SERVER; $user = $this->USER; $pass = $this->PASS; $dbase = $this->DBASE; Just use $this->SERVER; (etc) in your functions, like this: mysql_select_db($this->DBASE,$conn) Then follow Brian's advice. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#8038) next »