简体   繁体   English

无法在Codeigniter中加载CSS和JavaScript

[英]Cannot load css and javascript in codeigniter

Im using bootstrap as template in my project. 我在我的项目中使用引导程序作为模板。 When Im trying to access bootstrap in codeigniter, the page cannot load css and javascript. 当我尝试在codeigniter中访问引导程序时,该页面无法加载CSS和javascript。 I have added url in autoload.php $autoload['helper'] = array('url','form','html'); 我已经在autoload.php中添加了url $autoload['helper'] = array('url','form','html');

and link in the template and css file like this <link href="<?php echo base_url();?>assets/member/plugins/chartist-js/dist/chartist.min.css" rel="stylesheet"> 并像这样<link href="<?php echo base_url();?>assets/member/plugins/chartist-js/dist/chartist.min.css" rel="stylesheet">

here is the directory where css and the other file exsist : https://www.dropbox.com/s/mk8tmylkbl106ep/gmbr.png?dl=0 这是css和其他文件所在的目录: https ://www.dropbox.com/s/mk8tmylkbl106ep/gmbr.png ? dl =0

Try to add this in your controller 尝试将其添加到您的控制器中

$this->load->helper('url'); $ this-> load-> helper('url');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM