我有这个控制器:
class Work extends MY_Controller {
public function assign($id) {
//validation checks
if ($this->form_validation->run() === FALSE) {
$this->load->view("work/assign/" . $id);
} else {
//success
}
}
}
除了我的观点外,views/work/assign.php
我还有以下路线:
$route['work/assign/(:any)'] = 'work/assign/$1';
当我进入/work/assign/1
浏览器时,我收到此错误:Unable to load the requested file: work/assign/1.php
我希望它使用参数 1 呈现页面