登山扣不工作 - Codeigniter库

时间:2009-07-24 19:04:26

标签: codeigniter

我无法让Carabiner工作......

没有任何错误 - 我的文件无效。

我没有更改配置。

在我的功能中,我有:

    $this->load->library('carabiner');
    $this->carabiner->display();

这应该输出我的asstes文件夹中的所有css和js,对吗?

我也试过移动资产文件夹。现在它位于/ application / assets

我得错了什么?!

2 个答案:

答案 0 :(得分:0)

看起来你还需要使用carabiner对象来获取js和css:

// add a js file
$this->carabiner->js('scripts.js');

// add a css file
$this->carabiner->css('reset.css');

// add a css file with a mediatype
$this->carabiner->css('admin/print.css','print'); 

请参阅http://codeigniter.com/wiki/Carabiner/

答案 1 :(得分:0)

$this->load->library('carabiner');
$this->carabiner->css('file1.css');// load as many css file as you want.
$this->carabiner->css('file2.css');// load as many css file as you want.
$this->carabiner->js('file1.js');// load as many js file as you want.
$this->carabiner->js('file2.js');// load as many cjs file as you want.
$this->carabiner->display(); // output html which loads cached files  

请参阅此网站,并逐步指导实施该网站。 Carabiner integration with codeigniter