private function connect()
{
try{
//設定資料來源 DSN
$dsn = "{$this->dbConfig['db']}:host={$this->dbConfig['host']};
port={$this->dbConfig['port']};dbname={$this->dbConfig['dbname']};
charset={$this->dbConfig['charset']}";
//建立PDO對象
new PDO($dsn,$this->dbConfig['user'],$this->dbConfig['pass']);
//設定客戶端的預設字元集
$this->conn->query("SET NAMES {$this->dbConfig['charset']}"); //這裡是70行
}catch (PDOException $e){
die('資料庫連線失敗'.$e->getMessage());
}
}