谁能告诉我,如何在 cakephp $this->requestAction(...) 中传递参数?
最佳答案
requestAction(string $url, array $options)
此函数从任何位置调用 Controller 的操作并从操作返回数据。传递的 $url 是 CakePHP 相关的 URL (/controllername/actionname/params)
。要将额外数据传递给接收 Controller 操作,请添加到 $options 数组。
# echo $this->requestAction('/articles/view/5');
关于php - 如何在 cakephp requestAction 中传递参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4524863/