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
));
但這並不奏效。任何想法我可以做這個請嗎?
謝謝