问题 Is it possible to keep all my database related configuration (hostnames, usernames, passwords, and databases) as well as the function to connect to and select the correct database in a separate class? I tried something like this: class Database { var $config = array( 'username' => 'someuser', 'password' => 'somepassword', 'hostname' => 'some_remote_host', 'database' => 'a_database' ); function __construct() { $this->connect(); } function connect() { $db = $this->config; $conn = mysql_connect(