2019-09-09 23:48:52 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Config options
|
|
|
|
*/
|
|
|
|
|
2019-09-10 18:25:26 +00:00
|
|
|
$YEAR = $_ENV["CORRES2MATH_YEAR"];
|
|
|
|
$URL_BASE = $_ENV["CORRES2MATH_URL_BASE"];
|
|
|
|
$LOCAL_PATH = $_ENV["CORRES2MATH_LOCAL_PATH"];
|
|
|
|
$MAIL_DOMAIN = $_ENV["CORRES2MATH_MAIL_DOMAIN"];
|
|
|
|
$MAIL_DOMAIN = "correspondances-maths.fr";
|
2019-09-09 23:48:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* DB infos
|
|
|
|
*/
|
|
|
|
|
2019-09-10 18:25:26 +00:00
|
|
|
$DB_HOST = $_ENV["CORRES2MATH_DB_HOST"];
|
|
|
|
$DB_NAME = $_ENV["CORRES2MATH_DB_NAME"];
|
|
|
|
$DB_USER = $_ENV["CORRES2MATH_DB_USER"];
|
|
|
|
$DB_PASSWORD = $_ENV["CORRES2MATH_DB_PASSWORD"];
|
2019-09-09 23:48:52 +00:00
|
|
|
|
|
|
|
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");
|