CodeIgniter Forums
Base_URL Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Base_URL Problem (/showthread.php?tid=30257)



Base_URL Problem - El Forum - 05-07-2010

[eluser]Unknown[/eluser]
Hello Everyone,

I've been using Codeigniter for almost a year now, and I encountered a problem last yr (To which I only wanted to correct the problem now. Funny :p). I upgraded my XAMPP to the latest version and it seems that the base_url function is not working anymore. It doesn't display the images that I have in the root folder. Here's my config file taken from codewiki.

$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']);

Is there an update configuration that I should use to display the images in the images folder in the root directory? Javascript also doesn't work. Thanks in advance!


Base_URL Problem - El Forum - 05-08-2010

[eluser]steelaz[/eluser]
So what is the output of base_url() and what is your actual URL to application?