Mise à jour de 'api-rest/index.php'
continuous-integration/drone/push Build is passing Details

testDockerToto
Thomas CHAZOT 2 years ago
parent c2199964d9
commit 84bbfc7291

@ -17,17 +17,18 @@
// ------
// Comment faire un fichier .htaccess pour protéger ce fichier ?????????
// ------
//$ini_array= parse_ini_file("config.ini");
$ini_array= parse_ini_file("config.ini");
$dsn = "mysql:host=". getenv("DB_SERVER").";dbname=". getenv("MYSQL_DATABASE");
$username = getenv("MYSQL_USER_TOM");
$password = getenv("MYSQL_PASSWORD_TOM");
//$dsn = "mysql:host=". getenv("DB_SERVER").";dbname=". getenv("MYSQL_DATABASE");
//$username = getenv("MYSQL_USER_TOM");
//$password = getenv("MYSQL_PASSWORD_TOM");
echo $dsn . " " . $username . " " . $password . " ";
//echo $dsn . " " . $username . " " . $password . " ";
// Initializing Database
try{
$database = new DatabaseConnection($dsn,$username,$password);
//$database = new DatabaseConnection($dsn,$username,$password);
$database = new DatabaseConnection($ini_array['dsn'],$ini_array['username'],$ini_array['password']);
} catch (PDOException $e) {
echo "ERROR connection";
header("HTTP/1.0 ".$e->getMessage());

Loading…
Cancel
Save