php - Twitter Bootstrap Path Breaks When Not on Homepage -


i testing website on local server. have issues twitter bootstrap's path in header view.

on homepage path works fine:

<link href="bootstrap/css/bootstrap.css" rel="stylesheet"> 

when move sub-page via link:

<a href="index.php/home_controller/getfilmdetails?id... 

which translates to:

http://localhost/www.mywebsite.co.uk/index.php/home_controller/getfilmdetails?id=114 

controller code:

$this->load->view('/header/header_home'); $this->load->view('movies_details_view',$data); $this->load->view('footer_home'); 

path twitter bootstrap not work, , need change path to:

<link href="/bootstrap/css/bootstrap.css" rel="stylesheet"> 

how make path work on pages?

in controller this:

$this->load->helper('url'); $this->load->view('/header/header_home'); $this->load->view('movies_details_view',$data); $this->load->view('footer_home'); 

inside header view this:

<link href="<?php echo base_url('/bootstrap/css/bootstrap.css') ?>" rel="stylesheet"> 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -