css - Difference between base_url scenarios -


i bit confuse difference between 2 url scenarios

$config['base_url'] = ''; $config['base_url'] = 'localhost/blabla';  <link rel="stylesheet" type="text/css" href="<?php echo base_url(). 'css/style.css'; ?>" /> 

if set base_url() on first given site apply css if set second given example css not apply , browser logs not found(404) has same generated url

localhost/blabla/css/style.css 

why? reading documentation in elislab website cant figure out. input guys..

 $config['base_url'] = '';  $config['base_url'] = 'localhost/blabla'; 

try this, should work both above:

<?php     $this->load->helper('url'); ?> <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>/css/style.css" /> 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -