public function run() { $dsn = $this->dbtype . ':host=' . $this->host . ';' . 'dbname=' . $this->db . ';' . 'charset=' . $this->charset . ';' . 'port=' . $this->port; try { self::$_pdo = new PDO($dsn, $this->user, $this->password, array(PDO::ATTR_PERSISTENT => true)); //echo 'success<br>'; } catch (Exception $e) { die('message:' . $e->getMessage()); } self::$_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); }