add env.descartes.php.dist

This commit is contained in:
osaajani 2021-04-06 21:42:30 +02:00
parent f992fe21bc
commit 78fce650cc
1 changed files with 21 additions and 0 deletions

21
env.descartes.php.dist Normal file
View File

@ -0,0 +1,21 @@
<?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,
];