Environment::getBaseURL()
\nn\t3::Environment()->getBaseURL();
Returns the baseUrl(config.baseURL), incl. http(s) protocol e.g. https://www.webseite.de/
\nn\t3::Environment()->getBaseURL();
Copied!
| @return string
Source Code
public function getBaseURL ()
{
$setup = \nn\t3::Settings()->getFullTyposcript();
if ($baseUrl = $setup['config']['baseURL'] ?? false) return $baseUrl;
$host = $_SERVER['HTTP_HOST'] ?? '';
$server = ($this->isHttps() ? 'https' : 'http') . "://{$host}/";
return $server;
}
Copied!