2016-03-28 23 views
0

我使用引導程序更改grocery-crud中的主題,但我的代碼無法正常工作。引導程序不在雜貨店裏工作

我的控制器:

public function siswa(){ 
    $crud = new grocery_CRUD(); 
    $crud->set_theme('bootstrap'); 
    $crud->set_table('murid'); 
    $output = $crud->render(); 
    $this->load->view('tampilan',$output); 
} 

請幫助我。下面

遇到

一個PHP錯誤

嚴重

錯誤信息:警告

消息:包括(資產/ grocery_crud /主題/引導/ config.php文件): 未能打開流:沒有這樣的文件或目錄

文件名:libraries/Grocery_CRUD.php

行號:2852

回溯:

文件: C:\ XAMPP \ htdocs中\ grocerycrud \程序\ \庫Grocery_CRUD.php 線:2852功能:_error_handler

文件: Ç :\ XAMPP \ htdocs中\ grocerycrud \程序\庫\ Grocery_CRUD.php 線:2852功能:setThemeBasics

文件: C:\ XAMPP \ htdocs中\ grocerycrud \程序\庫\ Grocery_C RUD.php 線:4476功能:setThemeBasics

文件:C:\ XAMPP \ htdocs中\ grocerycrud \程序\ \控制器Coba.php 線:19功能:使

文件:C:\ XAMPP \ htdocs目錄\ grocerycrud \的index.php線:292功能: require_once

+0

錯誤告訴你的主題文件不存在,你正確設置?檢查目錄assets/grocery_crud/themes/bootstrap/config.php 我從來沒有嘗試過這個主題,我只是使用數據表和flexigrid。 –

+0

我無法在引導目錄中找到config.php,但錯誤消息總是告訴config.php無法打開流。 我只是想用bootstrap重新設計表格。 – Trisna

+0

嘗試在該目錄中創建一個名爲config.php的新文件,它只是有以下幾行: <?php $ config ['crud_paging'] = true; –

回答

0

剛剛創建grocery_crud /主題/引導config.php文件,把空白

0

很容易在控制器添加。

public function siswa(){ 
    $crud = new grocery_CRUD(); 
    $crud->set_theme('bootstrap'); 
    $crud->set_table('murid'); 
    $output = $crud->render(); 
    $this->_example_output($output); 
} 

和視圖,加載所有的CSS和引導等

<div class="box box-primary"> 
    <div class="box-body">      
      <?php echo $output; ?>       
    </div> 
</div>