nihilism machine schreef:
How does this look now?
just as bad as before. you haven't even tried to run the code have you?
<?php
class dbconfig {
public $connInfo = array();
public $connInfo[$hostname] = 'host.com';
public $connInfo[$username] = 'dbuser';
public $connInfo[$password] = 'dbpass';
public $connInfo[$database] = 'mydbname';
public __construct() {
return $this->$connInfo;
}
}
?>
<?php
include_once("dbconfig.class.php");
class dbconn extends dbconfig {
public $DB;
public __constructor(){
$this->$connInfo = new dbconfig();
$username =
$hostname =
$password =
$database =
$DB = new
PDO("mysql:host=$connInfo[$hostname];dbname=$connInfo[$database]",
$connInfo[$username], $connInfo[$password]);
return $DB;
}
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php