Tutorial by Examples

You will need to set your base URL in application/config/config.php If it is not set, then CodeIgniter will try to guess the protocol and path to your installation, but due to the security concerns the hostname will be set to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise. The auto...
What happens if I don't set base_url ? You will not get any Impotency error to set this and proceed. You can continue without setting, but you should know about HTTP header injection If I did't set it what will show up? You will get http://[::1]/ instead of your actual URL. What does this m...
The following lines of code is more smart way to setting up the base_url in codeigniter: $config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); $config['base_url'] .= "://".$_SERVER['HTTP_HOST']; $config[...

Page 1 of 1