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

testDockerToto
Thomas CHAZOT 2 years ago
parent d0b533117e
commit bdb61a9e04

@ -19,16 +19,15 @@
// ------ // ------
$ini_array= parse_ini_file("config.ini"); $ini_array= parse_ini_file("config.ini");
//$dsn = "mysql:host=". getenv("DB_SERVER").";dbname=". getenv("MYSQL_DATABASE"); $dsn = "mysql:host=". getenv("DB_SERVER").";dbname=". getenv("MYSQL_DATABASE");
//$username = getenv("MYSQL_USER_TOM"); $username = getenv("MYSQL_USER_TOM");
//$password = getenv("MYSQL_PASSWORD_TOM"); $password = getenv("MYSQL_PASSWORD_TOM");
//echo $dsn . " " . $username . " " . $password . " "; echo $dsn . " " . $username . " " . $password . " ";
// Initializing Database // Initializing Database
try{ 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) { } catch (PDOException $e) {
echo "ERROR connection"; echo "ERROR connection";
header("HTTP/1.0 ".$e->getMessage()); header("HTTP/1.0 ".$e->getMessage());

Loading…
Cancel
Save