Typo3 Dev: Get Base URL in Extension
There are two ways to get the base URL in your Code, either you use:
print $GLOBALS['TSFE']->baseUrl;
or from your TypoScript configuration use:
print $GLOBALS['TSFE']->tmpl->setup['config.']['baseURL'];
Be careful, you have to set the baseURL in your TypoScript or both options won’t work at all.
Cheers







