php codeigniter base_url not working -


i using codeigniter write out templates website. problem i'm trying achieve absolute paths attributes such href , src, aren't working. i've checked results, , link's , scripts point through correct directory, i'm not sure why there problem.

this code i'm using below:

<!doctype html> <html>     <head>         <meta charset="utf-8">         <title>home</title>         <meta name="viewport" content="width=device-width, initial-scale=1.0">         <meta name="description" content="">          <link rel="stylesheet" href="<?php echo base_url() . "assets/bootstrap/css/bootstrap.css"; ?>">         <link rel="stylesheet" href="<?php echo base_url() . "assets/bootstrap/css/bootstrap-responsive.css"; ?>">          <!-- html5 shim, ie6-8 support of html5 elements -->         <!--[if lt ie 9]>             <script src="<?php echo base_url() . "assets/html5shiv/html5shiv.js"; ?>"></script>         <![endif]-->          <!-- fav , touch icons go here -->       </head> <body>     <p>this comes header view.</p>      <button class="btn btn-primary">primary</button>     <br />     <a class="btn btn-primary">secondary</a> 

i can tell isn't working because i'm trying use bootstrap style 2 buttons, aren't working. can please me figure out?

oh, way..my base_url http://localhost/projectname/, , know have working correctly because have enabled url helper , able echo base_url.

please make sure you've loaded url helper, in autoload.php, , make sure you've added defined base_url in config.php. if not should out.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -