Téléverser les fichiers vers "/"

This commit is contained in:
2026-06-03 08:52:09 +00:00
parent d37151273f
commit 709826a53b
3 changed files with 59 additions and 0 deletions

18
config.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
define('DB_HOST', 'smarthome_db');
define('DB_USER', 'smarthome_user');
define('DB_PASSWORD', 'SH_LaSalle_SD8');
define('DB_NAME', 'smarthome');
define('JWT_SECRET', 'smarthome_secret_key_2024_smart_home_project_very_long_key');
define('MQTT_BROKER', 'localhost');
define('MQTT_PORT', 1883);
define('MQTT_TOPIC_CLIMATE', 'smarthome/climate');
define('MQTT_TOPIC_SECURITY', 'smarthome/security');
function get_db() {
$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if ($conn->connect_error) {
die(json_encode(['error' => 'Connexion échouée : ' . $conn->connect_error]));
}
return $conn;
}
?>