Skip to content

Instantly share code, notes, and snippets.

@MkDierz
Created July 30, 2021 16:33
Show Gist options
  • Save MkDierz/4100a330f574a57692641237ffbb2c16 to your computer and use it in GitHub Desktop.
Save MkDierz/4100a330f574a57692641237ffbb2c16 to your computer and use it in GitHub Desktop.
$config['base_url'] = "http://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= preg_replace('@/+$@', '', dirname($_SERVER['SCRIPT_NAME'])).'/';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment