Contao\Environment::scriptName PHP Method

scriptName() protected static method

Return the relative path to the script (e.g. /website/index.php)
protected static scriptName ( ) : string
return string The relative path to the script
    protected static function scriptName()
    {
        $request = \System::getContainer()->get('request_stack')->getCurrentRequest();
        if ($request === null) {
            return @$_SERVER['ORIG_SCRIPT_NAME'] ?: $_SERVER['SCRIPT_NAME'];
        }
        return $request->getScriptName();
    }