0

I want to integrate the Bootstrap 3 in my CodeIgniter. I have latest versions of CodeIgniter and Bootstrap 3. Here's how the directory tree looks like:

Project Name

-application
----views
--------home.php
-dist (from Bootstrap3)
-system

Now I've configured my config.php and autoload.php:

$autoload['helper'] = array('form','url','html');

Problem now is when I'm trying to copy one of the templates in Bootstrap 3 just to try out if it's working, it will just display plain HTML. I think the problem is this:

<link rel="stylesheet" href="<?php echo site_url('../../dist/css/bootstrap.min.css'); ?>" >
<script src="<?php base_url()?>../../dist/js/jquery-1.10.2.min.js"></script> 
<script src="<?php base_url()?>../../dist/js/bootstrap.min.js"></script>

Am I doing this right? Please help me. Thank you.

2
  • try removing ../../ after base_url() Commented Nov 17, 2013 at 17:26
  • can you please also post the value of your base_url in config.php? Commented Nov 18, 2013 at 1:36

1 Answer 1

1

Assuming your base_url() is localhost/your_root_diractory_name ,if u are in local server. This should Help.If you are in linux server there may be permission issue

<link rel="stylesheet" href="<?php echo base_url();?>dist/css/bootstrap.min.css" >
<script src="<?php echo base_url()?>dist/js/jquery-1.10.2.min.js"></script> 
<script src="<?php echo base_url()?>dist/js/bootstrap.min.js"></script>
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the help. But this also didn't work. Yes, its local.
can you post ur base_url()?? and what is your os?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.