0
我有一個查詢,從數據庫表中獲得一個隨機的記錄,並在保存,$banner_text
我有顯示但在我的模板,橫幅文字的麻煩。笨從數據庫顯示隨機記錄每一個頁面加載
下面是我的MY_Controller代碼,它是我所有其他控制器擴展的代碼,我希望使用它將$banner_text
發送到正在構建的任何模板/佈局。
class MY_Controller extends Controller {
function __construct() {
parent::Controller();
$this->load->model('banners_model');
//$this->output->enable_profiler(TRUE);
$this->template->set_theme('moovjob');
$this->template->set_layout('main');
//$this->banners_model->get_header();
//$this->template->title('Some title');
//$this->template->build('main');
}
}
你能澄清你的問題? – 2011-05-16 15:31:24