2013-02-06 72 views
0

我遇到了codeigniter + grocery crud安裝問題。codeigniter&grocery crud安裝

下面是我的文件結構:

base/ci_213/application/demo/config/config.php 
       $config['base_url'] = 'http://localhost/'; 
       $config['index_page'] = ''; 

base/ci_213/application/demo/config/autoload.php 
       $autoload['libraries'] = array('database', 'grocery_CRUD');   
       $autoload['helper'] = array('url'); 
base/ci_213/system/... 
base/ci_213/assets/... 
base/www/index.php 
     $system_path  = '../ci_213/system'; 
     $application_folder = '../ci_213/application/demo'; 

通過以上的設置,我可以查看網頁「歡迎到笨!」 (本地主機)

member.php

class Member extends CI_Controller 
{ 
    public function __construct() {  parent::__construct(); } 
    public function index() { echo "<h1>Welcome to the world of Codeigniter</h1>"; } 

    public function employees() 
    { 
    $crud = new grocery_CRUD(); 
    $crud -> set_table('employees'); 
    $output = $crud -> render(); 
    $this -> load -> view('template_member', $output); 
    } 
} 

template_member.php

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8" /> 
     <title>Grocery CRUD Testing</title> 
     <?php foreach($css_files as $file): ?> 
     <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" /> 
     <?php endforeach; ?> 
     <?php foreach($js_files as $file): ?> 
     <script src="<?php echo $file; ?>"></script> 
     <?php endforeach; ?> 
     <style type='text/css'> 
    </head> 
    <body> 
    <?php echo $output; ?> 

我能看到 「歡迎到笨的世界」(本地主機/成員)

我有問題要查看(本地主機/成員/員工)。它顯示我一個空白的白頁。

但是當我查看html代碼時,它顯示所有僱員的數據都在html代碼中。
我不知道爲什麼它不顯示內容,但給一個空白的白頁。

請指教我錯過了,謝謝。

部分的html代碼:

<link type="text/css" rel="stylesheet" href="http://localhost/assets/grocery_crud/themes/flexigrid/css/flexigrid.css" /> 
<link type="text/css" rel="stylesheet" href="http://localhost/assets/grocery_crud/css/jquery_plugins/fancybox/jquery.fancybox.css" /> 
<script src="http://localhost/assets/grocery_crud/js/jquery-1.8.2.min.js"></script> 
<script src="http://localhost/assets/grocery_crud/themes/flexigrid/js/cookies.js"></script> 
<script src="http://localhost/assets/grocery_crud/themes/flexigrid/js/flexigrid.js"></script> 
<script src="http://localhost/assets/grocery_crud/themes/flexigrid/js/jquery.form.js"></script> 
<script src="http://localhost/assets/grocery_crud/js/jquery_plugins/jquery.numeric.min.js"></script> 
<script src="http://localhost/assets/grocery_crud/themes/flexigrid/js/jquery.printElement.min.js"></script> 
<script src="http://localhost/assets/grocery_crud/js/jquery_plugins/jquery.fancybox.pack.js"></script> 
<script src="http://localhost/assets/grocery_crud/js/jquery_plugins/jquery.easing-1.3.pack.js"></script> 

回答

1

在template_member.php刪除一行代碼<style type='text/css'>或代碼<style type='text/css'></style>替換它。

+0

謝謝使徒,它的工作原理!但後來我發現該頁面實際上是引用到我在base/www/assets /中的舊文件夾...我刪除了舊文件夾,現在它不工作(消息:include(assets/grocery_crud/languages/english.php) :無法打開流:沒有這樣的文件或目錄)。我想要頁面引用base/ci_213/assets/...上面的www文件夾的文件夾,可以這樣做嗎? – user1884324