Files
sld-php-template/config/init.php

25 lines
768 B
PHP

<?php
include("config/functions_init.php");
$env="generic";
switch($env){
/*------ DON'T TOUCH THIS PART ------ */
case "generic":
define('WEB_ROOT', $_SERVER['DOCUMENT_ROOT']);
define('DOMAIN', $_SERVER['HTTP_HOST']);
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https://' : 'http://';
define('FULL_DOMAIN', $protocol . $_SERVER['HTTP_HOST']);
define("ROOT_URL", "http://" . DOMAIN );
define("ROOT_DIR", WEB_ROOT . "/");
break;
/* ----------------------------------- */
default:
// Showing error page by default.
include("pages/env-error.php");
die;
}
require_once(ROOT_DIR . "config/constants.php");
require_once(CONFIG_FOLD . "settings.php");
?>