Created
April 6, 2017 18:53
-
-
Save Reflej0/27c927abc703952599b3d9f4dd178058 to your computer and use it in GitHub Desktop.
Fragmento del config.php de CodeIgniter para no tener inconvenientes al montar el proyecto en un servidor WEB.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); | |
$config['base_url'] .= "://".$_SERVER['HTTP_HOST']; | |
if (!isset($_SERVER['ORIG_SCRIPT_NAME'])) | |
{ | |
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']); | |
} | |
else | |
{ | |
$config['base_url'] .= str_replace(basename($_SERVER['ORIG_SCRIPT_NAME']),"",$_SERVER['ORIG_SCRIPT_NAME']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment