'error', 'message' => 'Invalid or missing INIT_TOKEN.', ], JSON_PRETTY_PRINT); exit; } try { require __DIR__ . '/scripts/init_db_core.php'; $result = initializeDatabase(); echo json_encode([ 'status' => 'success', 'message' => 'Database initialized successfully.', 'result' => $result, ], JSON_PRETTY_PRINT); } catch (Throwable $e) { http_response_code(500); echo json_encode([ 'status' => 'error', 'message' => $e->getMessage(), ], JSON_PRETTY_PRINT); }