-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错误它的工作原理,用户指南给我的感觉这应该工作。