我看到,爲了使數據庫表的出現,像創建數據表將數據傳遞到視圖代碼點火器
$dataToBePassed = //SOME QUERY
$this->load->view('viewpage', $dataToBePassed);
用於
,但我會怎麼用模板做呢?
像我有這樣的看法加載到我的模板
$data['content_view'] = 'viewpage';
$this->templates->admin_template($data);
然後將傳遞到
//templates html codes
<?php $this->load->view($content_view); ?>
//templates html codes
如何使
//templates html codes
<?php $this->load->view($content_view); ?>
//templates html codes
這樣
//templates html codes
<?php $this->load->view($content_view, $data); ?>
//templates html codes
什麼樣的錯誤你的編碼顯示? – msvairam
你可以使用,你有任何錯誤? – devpro
沒有錯誤,但昨天我不知道我做了什麼,但我認爲我點擊檢查元素錯誤的東西,它顯示模板不符合,身體說'找不到'Job_Titles/jobtitles_read',$ data,FALSE.php' –