0
$route['[0-9A-Za-z]'] = "editor/index/$1";
当我看着我的编辑控制器,在索引方法中,我没有得到参数通过。它只是说, “$ 1”为什么不会在CodeIgniter中传递参数?
$route['[0-9A-Za-z]'] = "editor/index/$1";
当我看着我的编辑控制器,在索引方法中,我没有得到参数通过。它只是说, “$ 1”为什么不会在CodeIgniter中传递参数?
你可以尝试只$route[ '(:any)' ] = "editor"
然后,只需办理必要的:
function index() {
$id = $this->uri->segment(3); // Or whatever segment you end up with.
// Do something.
}