[eluser]davidbehler[/eluser]
base_url only works if you are not using index.php.
Try using site_url() instead, it provides the same as base_url but includes the index.php if it's needed and it even accepts arguments:
Code:
// base_url:
echo base_url(); // http://localhost/your_ci_folder/
// site_url without index file in config.php:
echo site_url(); // http://localhost/your_ci_folder/
// site_url with index file in config.php:
echo site_url(); // http://localhost/your_ci_folder/index.php/
// site_url with index file in config.php and arguments:
echo site_url('blog/view'); // http://localhost/your_ci_folder/index.php/blog/view
I usually use anchor() or site_url() to generate links/urls that point to my controllers/functions and base_url() when generating urls to images, js files and so that are not in the application folder, e.g.
Code:
<img src="<?php echo base_url().'images/test/test.png'; ?>" />