Upload files to "config"

This commit is contained in:
2026-06-02 03:17:21 +00:00
parent 380c51ceeb
commit 6ff615a270
2 changed files with 75 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
// Sesuaikan konfigurasi database sesuai lingkungan server yang digunakan.
$DB_HOST = 'localhost';
$DB_NAME = 'sipantas_webgis';
$DB_USER = 'root';
$DB_PASS = '';
$DB_CHARSET = 'utf8mb4';
try {
$pdo = new PDO(
"mysql:host={$DB_HOST};dbname={$DB_NAME};charset={$DB_CHARSET}",
$DB_USER,
$DB_PASS,
[
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
]
);
} catch (PDOException $e) {
http_response_code(500);
die('Koneksi database gagal. Pastikan database sipantas_webgis sudah di-import. Detail: ' . htmlspecialchars($e->getMessage()));
}