fixed 2 connections
This commit is contained in:
@@ -3,17 +3,17 @@
|
|||||||
# Type="MYSQL"
|
# Type="MYSQL"
|
||||||
# HTTP="true"
|
# HTTP="true"
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
require_once __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
if (!isset($_ENV['DB_HOST'])) {
|
if (!isset($_ENV['DB_HOST'])) {
|
||||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../../');
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
|
||||||
$dotenv->safeLoad();
|
$dotenv->safeLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
$hostname_cmctrfdb = $_ENV['DB_HOST'];
|
$hostname_cmctrfdb = $_ENV['DB_HOST'] ?? 'localhost';
|
||||||
$database_cmctrfdb = $_ENV['DB_DATABASE'];
|
$database_cmctrfdb = $_ENV['DB_DATABASE'] ?? '';
|
||||||
$username_cmctrfdb = $_ENV['DB_USERNAME'];
|
$username_cmctrfdb = $_ENV['DB_USERNAME'] ?? '';
|
||||||
$password_cmctrfdb = $_ENV['DB_PASSWORD'];
|
$password_cmctrfdb = $_ENV['DB_PASSWORD'] ?? '';
|
||||||
|
|
||||||
$servername = $hostname_cmctrfdb;
|
$servername = $hostname_cmctrfdb;
|
||||||
$username = $username_cmctrfdb;
|
$username = $username_cmctrfdb;
|
||||||
|
|||||||
Reference in New Issue
Block a user