Initial commit untuk UAS SIG

This commit is contained in:
z0rayy
2026-06-08 21:16:23 +07:00
commit c90ce9aedc
39 changed files with 7105 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
// ============================================
// koneksi.php — Konfigurasi Database
// ============================================
define('DB_HOST', 'localhost');
define('DB_USER', 'root'); // Sesuaikan dengan user MySQL Anda
define('DB_PASS', ''); // Sesuaikan dengan password MySQL Anda
define('DB_NAME', 'webgis_spbu');
function getConnection(): mysqli {
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if ($conn->connect_error) {
http_response_code(500);
echo json_encode(['success' => false, 'message' => 'Koneksi database gagal: ' . $conn->connect_error]);
exit;
}
$conn->set_charset('utf8mb4');
return $conn;
}