Leo*_*Leo 15
mysite.com/myController/myAction/param1/param2
Run Code Online (Sandbox Code Playgroud)
在控制器中:
function myAction($arg1,$arg2)
{...}
Run Code Online (Sandbox Code Playgroud)
在视图中创建链接.
echo $this->Html->link('',array('controller'=>'Vehicles','action'=>'deleteimage',$param1,$param2),array('confirm'=>'Are you sure you want to delete the image?'));
Run Code Online (Sandbox Code Playgroud)
在上面的链接中,我发送了两个参数来控制器的deleteimage功能Vehicles.
在控制器中访问参数 public function deleteimage($id, $image)
| 归档时间: |
|
| 查看次数: |
19720 次 |
| 最近记录: |