Commit ec6fb5e4 authored by Mathieu Delestre's avatar Mathieu Delestre

fix ENV_BASEPATH (init and usage)

(oh) no more // (lemmings)
parent 582ad29e
Pipeline #4626 passed with stage
in 1 minute and 18 seconds
......@@ -13,7 +13,11 @@ use Gettext\Translator;
define('BOOTSTRAP_LOADED', true);
define('ENV_ROOTPATH', realpath(__DIR__));
define('ENV_BASEPATH', str_replace('bootstrap.php', '', getField($_SERVER, 'SCRIPT_NAME', getField($_SERVER, 'PHP_SELF'))));
$temp = str_replace('bootstrap.php', '', getField($_SERVER, 'SCRIPT_NAME', getField($_SERVER, 'PHP_SELF')));
define('ENV_BASEPATH', $temp.'/');
define('ENV_BASEPATH', '/');
define('ENV_REQUEST', str_replace(ENV_BASEPATH, '', getField($_SERVER, 'REQUEST_URI')));
define('ENV_ROUTE', preg_replace('/^[a-z]{2}\/?/', '', ENV_REQUEST) ? preg_replace('/^[a-z]{2}\/?/', '', ENV_REQUEST) : 'index');
......@@ -3,7 +3,7 @@ if(!defined('BOOTSTRAP_LOADED'))
die("Direct access is not authorized");
<a href="<?=route_url('');?>"><img class="logo" src="<?=ENV_BASEPATH;?>/assets/images/index.png" alt=" - Le Karaoke Mignon"></a>
<a href="<?=route_url('');?>"><img class="logo" src="<?=ENV_BASEPATH;?>assets/images/index.png" alt=" - Le Karaoke Mignon"></a>
<h2 class="welcome">
<h2 class="welcome">
<?=__("Bienvenue !");?>
......@@ -9,7 +9,7 @@ if(!defined('BOOTSTRAP_LOADED'))
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> - <?=__("Le Karaoke Mignon");?></title>
<link rel="stylesheet" href="<?=ENV_BASEPATH;?>/assets/style.css">
<link rel="stylesheet" href="<?=ENV_BASEPATH;?>assets/style.css">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment