如何传递参数在cakephp requestAction? [英] how to pass argument in cakephp requestAction?

查看:179
本文介绍了如何传递参数在cakephp requestAction?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我,如何传递参数在cakephp $ this-> requestAction(...)?

anyone can tell me, how to pass arguments in cakephp $this->requestAction(...)?

推荐答案

requestAction(string $url, array $options)

从任何位置调用控制器的操作,并从操作返回数据。传递的$ url是一个CakePHP相对的 URL(/ controllername / actionname / params)。将额外的数据传递给接收控制器动作添加到$ options数组。

This function calls a controller's action from any location and returns data from the action. The $url passed is a CakePHP-relative URL (/controllername/actionname/params). To pass extra data to the receiving controller action add to the $options array.

# echo $this->requestAction('/articles/view/5');

这篇关于如何传递参数在cakephp requestAction?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆