0
比方说,我想了一堆参数传递给像网址:CakePHP的URL阵列
http://localhost/my_app/my_controller/index/param1:1/param2:2/param3:3/param4:4
等等
但我的网址使用Html Helper的url
方法建立像这样:
$this->Html->url(array(
'controller' => 'my_controller',
'action' => 'index',
'param1' => 1,
'param2' => 2,
'param3' => 3,
'param4' => 4
));
我试图建立我的PARAMS成数组这样并将它传递给我的网址,如:
$my_params = array(
'param1' => 1,
'param2' => 2,
'param3' => 3,
'param4' => 4
);
$this->Html->url(array(
'controller' => 'my_controller',
'action' => 'index',
$my_params
));
但这并不奏效。任何想法我可以做这个请吗?
谢谢