Try to get the container name 5
continuous-integration/drone/push Build is passing Details

master
dohodin 2 years ago
parent 76ebc3a884
commit c678bd14b5

@ -14,10 +14,14 @@ $views['thanks'] = 'Views/HTML/thanks.php';
$views['error'] = 'Views/HTML/error.php';
$_SERVER['BASE_URI'] = '';
$url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo "URL : ".$url;
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
$url = $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
echo $url;
echo "URL : ".$url." ";
$newUrl=parse_url($url, PHP_URL_PATH);
echo "NewURL : ".$newUrl;
echo "NewURL : ".$newUrl." ";
$container_name = basename($newUrl);
echo "Container : ".$container_name;

Loading…
Cancel
Save