1
我想的路线是这样的: http://myapp.com/mycontroller/...?x= ...通配符锂路由
其中后myController的一切都还是个未知数。我不知道路径,我不知道任何参数。路由路径和参数应该显示为一个变量。
// route in routes.php
Router::connect('/mycontroller/*', 'Mycontroller::index');
// the index function of Mycontroller class
public function index($pathWithParameters) {
print_r($pathWithParameters); // something like: 'hello/world?name=mewel&id=123
}
这可能吗?
你也可以在你的控制器中使用func_get_args()。看看默认的PagesController的例子 – 2012-02-24 02:03:36
你可以使用“编辑”而不是评论在这里。 – greut 2012-02-24 12:52:25