コード例 #1
0
 private function __construct()
 {
     self::$connection = new mysqli(self::$host, self::$username, self::$password, self::$database);
     if (self::$connection->connect_errno) {
         echo "Connection to database failed" . self::$connection->connect_error;
         exit;
     }
 }