10 lines
423 B
Plaintext
10 lines
423 B
Plaintext
<?php
|
|
$dbHost = 'localhost';
|
|
$dbUser = 'user';
|
|
$dbPass = 'pass';
|
|
$dbName = 'database';
|
|
|
|
$mysqli = mysqli_init();
|
|
$mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, true);
|
|
$mysqli->ssl_set($_SERVER['DOCUMENT_ROOT'] . "/path/to/client-key.pem", $_SERVER['DOCUMENT_ROOT'] . "/path/to/client-cert.pem", $_SERVER['DOCUMENT_ROOT'] . "/path/to/ca-cert.pem", NULL, NULL);
|
|
$mysqli->real_connect($dbHost, $dbUser, $dbPass, $dbName); |