|
請問一下 Controller內放了二個 function 可以出輸到 一個 index.php 嗎
C: index.php
function index (){
$data['product'] = $this->db->query("SELECT * FROM tb_products LIMIT 0,5");
this->load->view('index',$data);
}
function news(){
$data['news'] = $this->db->query("SELECT * FROM tb_news LIMIT 0,5");
this->load->view('index',$data);
} |
|