Files
rpigroupplay/config/getBasePath.inc.php
2026-01-03 11:59:31 +01:00

7 lines
297 B
PHP

<?php
// 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";