-1
找遍周圍的例子,但我得到一個奇怪的結果笨URI不工作 - 404錯誤
我想有以下發生/頁/ 1 URL從數據庫中返回第1行的標記列的頁表。
控制器
public function index() { $id = $this->uri->segment(2); $content = $this->page->specificMarkup($id); $this->template->set('nav', 'support'); $this->template->set('content', $content); $this->template->load('master', 'contact'); }
模型
public function specificMarkup($id) { $query = $this->db->get_where('pages', $id); $row = $query->row(); return $row->markup; }
當我專門設置的$ id,但現在當我嘗試使用部分返回404錯誤它的工作原理,用戶指南給我的感覺這應該工作。