我试图连接它:
http://example.com/activate/A1B2C3
对此:
http://example.com/users/activate/A1B2C3
Router::connect('/activate/:token', array('controller' => 'users', 'action' => 'activate'), array('pass' => 'token'));
但该参数未被传递。我在这里做错了什么?
答案 0 :(得分:7)
pass
必须是数组。
Router::connect('/activate/:token',
array('controller' => 'users', 'action' => 'activate'),
array('pass' => array('token'))
);