Files
rpigroupplay/config/getBasePath.inc.php
2026-01-28 19:05:44 +01:00

9 lines
356 B
PHP

<?php
header('Content-Type: text/html; charset=UTF-8');
// Determina il percorso base dell'applicazione
$script_name = $_SERVER['SCRIPT_NAME'];
$script_path = dirname($script_name);
$base_path = rtrim($script_path, '/');
$base_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$base_path";