gpt4 book ai didi

cakephp - 如何在cakephp中的另一个 Controller 中调用Controller Action ?

转载 作者:行者123 更新时间:2023-12-04 17:39:52 25 4
gpt4 key购买 nike

我想在另一个 Controller (事件 Controller )中使用“getpoll”,这是用户 Controller 的 Action 。

我怎样才能使用它?

在此先感谢...所有...

最佳答案

您可以使用 Controller 的 requestAction 方法:

$this->requestAction('/comments/latest');

您可以根据您的需要以不同的方式调用它以获取详细信息查找链接:

食谱链接: Controller requestAction Method

关于cakephp - 如何在cakephp中的另一个 Controller 中调用Controller Action ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6606218/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com