The "assets" folder should be in the document root folder not in the application folder. Or you could add "application" to the path
Code:
<?php echo base_url("application/assets/css/bootstrap.css"); ?>
If the page is being viewed directly in a browser the "base_url" is not necessary. You can change the links to be
Code:
<link rel="stylesheet" href="/assets/css/bootstrap.css" />
Hope that helps,
Scott
(12-07-2016, 05:20 AM)blackbulldog Wrote: Hi,
I've done my usual ... that is not set up a new CI project for over a year and now I've forgotten how to integrate bootstrap into it.
I've got a folder under 'application' called assets.
Assets has 3 sub-folders: css, fonts, js. These folders contain all the bootstrap and jquery files I'll need.
In my view template I have the following:
Code:
<link rel="stylesheet" href="<?php echo base_url("assets/css/bootstrap.css"); ?>" />
<link rel="stylesheet" href="<?php echo base_url("assets/css/style.css"); ?>" />
<script type="text/javascript" src="<?php echo base_url("assets/js/jquery-1.11.2.min.js"); ?>"></script>
<script type="text/javascript" src="<?php echo base_url("assets/js/bootstrap.js"); ?>"></script>
<script type="text/javascript" src="<?php echo base_url("assets/js/popup.js"); ?>"></script>
which I'd hoped would be enough to find and use the files I need.
Problem is, when I load the site there doesn't seem to be any of the bootstrap formatting being used.
When I click on view page source and click on any of the links in the html - which looks like this:
Code:
<link rel="stylesheet" href="http://my.info/assets/css/bootstrap.css" />
<link rel="stylesheet" href="http://my.info/assets/css/style.css" />
<script type="text/javascript" src="http://my.info/assets/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="http://my.info/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="http://my.info/assets/js/popup.js"></script>
I get a 404 not found page.
Can someone tell me what I've missed?
Thanks in advance.