11-02-2007, 11:58 PM
|
#11 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Okey, I have another question.
Let's say I have DBmysql.php, and in it I have the class for mysql.
I also have DBoracle.php, and in it I have the class for oracle.
Then I have the file DB.php, where I have this static function.. how would I make an object of classes in other files?
PHP Code:
switch($type) { case 'mysql': include('DB'.$type.'.php'); self::$DB = new DBmysql; break; case 'mssql': include('DB'.$type.'.php'); self::$DB = new DBmssql; break; default: include('DB'.$type.'.php'); self::$DB = new DBmysql; break; }
????
|
|
|
|