private function settingUpRootMapping()
    {
        $arrayServerName = explode('.', $_SERVER['SERVER_NAME']);
        $scriptName = rtrim(str_replace($arrayServerName, '', dirname($_SERVER['SCRIPT_NAME'])), '/\\');
        define('BASE_URL', $scriptName);
        define('SYSTEM_ROOT', $_SERVER['DOCUMENT_ROOT'] . BASE_URL);
    }
private function settingUpRootMapping()
    {
        $arrayServerName = explode('.', $_SERVER['SERVER_NAME']);
        $scriptName = rtrim(str_replace($arrayServerName, '', dirname($_SERVER['SCRIPT_NAME'])), '/\\');
        define('BASE_URL', $scriptName);
        define('SYSTEM_ROOT', $_SERVER['DOCUMENT_ROOT'] . BASE_URL);
    }
private function settingUpRootMapping ( ) { $ arrayServerName = explode ( '.' , $ _SERVER [ 'SERVER_NAME' ] ) ; $ scriptName = rtrim ( str_replace ( $ arrayServerName , '' , dirname ( $ _SERVER [ 'SCRIPT_NAME' ] ) ) , '/\\' ) ; define ( 'BASE_URL' , $ scriptName ) ; define ( 'SYSTEM_ROOT' , $ _SERVER [ 'DOCUMENT_ROOT' ] . BASE_URL ) ; }
Creating BASE_URL & SYSTEM_ROOT

BASE_URL = Path to the root of the website
SYSTEM_ROOT = Full system path to the root of the website
Creating BASE_URL & SYSTEM_ROOT