Skip to content

Instantly share code, notes, and snippets.

@supanadit
Created August 1, 2019 01:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supanadit/67ecb40a3d7a4081b43dc7dce73743db to your computer and use it in GitHub Desktop.
Save supanadit/67ecb40a3d7a4081b43dc7dce73743db to your computer and use it in GitHub Desktop.
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment