示例#1
0
 public static function doConnect()
 {
     if (!isset($self::$hookup)) {
         try {
             self::$hookup = new PDO(self::$dsn, self::$usn, self::$pw);
         } catch (PDOException $e) {
             self::$hookup = null;
             die($e->getMessage());
         }
     }
     return self::$hookup;
 }