mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-27 12:13:01 +00:00
a368dfbead
# Conflicts: # docker-compose.yml # server_files/config.php # server_files/views/connexion.php # setup/create_database.sql
29 lines
668 B
PHP
29 lines
668 B
PHP
<?php
|
|
/**
|
|
* Config options
|
|
*/
|
|
|
|
$YEAR = getenv("TFJM_YEAR");
|
|
$URL_BASE = getenv("TFJM_URL_BASE");
|
|
$LOCAL_PATH = getenv("TFJM_LOCAL_PATH");
|
|
$MAIL_DOMAIN = getenv("TFJM_MAIL_DOMAIN");
|
|
|
|
/**
|
|
* DB infos
|
|
*/
|
|
|
|
$DB_HOST = getenv("TFJM_DB_HOST");
|
|
$DB_NAME = getenv("TFJM_DB_NAME");
|
|
$DB_USER = getenv("TFJM_DB_USER");
|
|
$DB_PASSWORD = getenv("TFJM_DB_PASSWORD");
|
|
|
|
try {
|
|
$DB = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME;charset=utf8", "$DB_USER", "$DB_PASSWORD", array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
|
}
|
|
catch (Exception $ex) {
|
|
die("Erreur lors de la connexion à la base de données : " . $ex->getMessage());
|
|
}
|
|
|
|
session_start();
|
|
setlocale(LC_ALL, "fr_FR.utf8");
|