Initial commit

This commit is contained in:
dena27
2026-06-10 18:48:37 +07:00
commit 084b171dbd
44 changed files with 35487 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
$host = 'localhost';
$dbname = 'latihan_webgis';
$username = 'root';
$password = '';
try {
$db = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
} catch (PDOException $e) {
http_response_code(500);
echo json_encode(['status' => 'error', 'message' => 'Koneksi database gagal: ' . $e->getMessage()]);
exit;
}