raspisms/env.descartes.php.dist

22 lines
718 B
Plaintext

<?php
$http_dir_path = '/raspisms'; //Path we need to put after servername in url to access app
$http_protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
$http_server_name = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost';
$https = $_SERVER['HTTPS'] ?? false;
if ( !isset($_SERVER['SERVER_PORT']) || ($_SERVER['SERVER_PORT'] == 80 && !$https) || ($_SERVER['SERVER_PORT'] == 443 && $https) )
{
$http_server_port = '';
}
else
{
$http_server_port = ':' . $_SERVER['SERVER_PORT'];
}
$http_pwd = $http_protocol . $http_server_name . $http_server_port . $http_dir_path;
$env = [
'HTTP_PWD' => $http_pwd,
];