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());
}
}