MAPG-43 connect to MySQL database in main.php
This commit is contained in:
parent
d1c28e2d91
commit
5a41348cc3
7
main.php
7
main.php
@ -15,4 +15,11 @@ if (!empty($_ENV['DEV'])) {
|
|||||||
ini_set('display_errors', '0');
|
ini_set('display_errors', '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Container
|
||||||
|
{
|
||||||
|
static MapGuesser\Interfaces\Database\IConnection $dbConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
Container::$dbConnection = new MapGuesser\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
Loading…
Reference in New Issue
Block a user