Téléverser les fichiers vers "/"

This commit is contained in:
2026-06-01 11:57:13 +00:00
parent eea2bff79d
commit aaf7333ecf
4 changed files with 117 additions and 0 deletions

22
config.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'smarthome_user');
define('DB_PASSWORD', 'motdepasse123');
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;
}
?>