mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-05-04 07:16:27 +02:00
add env.descartes.php.dist
This commit is contained in:
parent
f992fe21bc
commit
78fce650cc
1 changed files with 21 additions and 0 deletions
21
env.descartes.php.dist
Normal file
21
env.descartes.php.dist
Normal 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,
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue