Ürün Kodu : BP.010.0003
138. {
139. $this->connect = new MySQLi;
140.
141. $this->connect->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, true);
142. $this->connect->ssl_set($ssl['key'] ?? NULL, $ssl['cert'] ?? NULL, $ssl['ca'] ?? NULL, $ssl['capath'] ?? NULL, $ssl['cipher'] ?? NULL);
143. $this->connect->real_connect($host, $user, $pass, $db, $port, NULL, MYSQLI_CLIENT_SSL);
144. }
145. else
146. {
147. $this->connect = new MySQLi($host, $user, $pass, $db, $port);
148. }
149. }
150. catch( Exception $e )
151. {
152. throw new ConnectionErrorException;
153. }
154.
155. if( ! empty($this->config['charset'] ) ) $this->query("SET NAMES '".$this->config['charset']."'");
156. if( ! empty($this->config['charset'] ) ) $this->query('SET CHARACTER SET '.$this->config['charset']);
157. if( ! empty($this->config['collation']) ) $this->query('SET COLLATION_CONNECTION = "'.$this->config['collation'].'"');