<legend id='gjhhy'><style id='gjhhy'><dir id='gjhhy'><q id='gjhhy'></q></dir></style></legend>
  1. <i id='gjhhy'><tr id='gjhhy'><dt id='gjhhy'><q id='gjhhy'><span id='gjhhy'><b id='gjhhy'><form id='gjhhy'><ins id='gjhhy'></ins><ul id='gjhhy'></ul><sub id='gjhhy'></sub></form><legend id='gjhhy'></legend><bdo id='gjhhy'><pre id='gjhhy'><center id='gjhhy'></center></pre></bdo></b><th id='gjhhy'></th></span></q></dt></tr></i><div id='gjhhy'><tfoot id='gjhhy'></tfoot><dl id='gjhhy'><fieldset id='gjhhy'></fieldset></dl></div>
  2. <small id='gjhhy'></small><noframes id='gjhhy'>

      <bdo id='gjhhy'></bdo><ul id='gjhhy'></ul>
    <tfoot id='gjhhy'></tfoot>

      在 Yii2 中将数据从一个控制器动作转发到另一个控制器动作

      Forward data from one controller action to other in Yii2(在 Yii2 中将数据从一个控制器动作转发到另一个控制器动作)

      <tfoot id='4e7ba'></tfoot>
          <bdo id='4e7ba'></bdo><ul id='4e7ba'></ul>
              <tbody id='4e7ba'></tbody>

              <small id='4e7ba'></small><noframes id='4e7ba'>

                <legend id='4e7ba'><style id='4e7ba'><dir id='4e7ba'><q id='4e7ba'></q></dir></style></legend>
                <i id='4e7ba'><tr id='4e7ba'><dt id='4e7ba'><q id='4e7ba'><span id='4e7ba'><b id='4e7ba'><form id='4e7ba'><ins id='4e7ba'></ins><ul id='4e7ba'></ul><sub id='4e7ba'></sub></form><legend id='4e7ba'></legend><bdo id='4e7ba'><pre id='4e7ba'><center id='4e7ba'></center></pre></bdo></b><th id='4e7ba'></th></span></q></dt></tr></i><div id='4e7ba'><tfoot id='4e7ba'></tfoot><dl id='4e7ba'><fieldset id='4e7ba'></fieldset></dl></div>

              1. 本文介绍了在 Yii2 中将数据从一个控制器动作转发到另一个控制器动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                是否可以在渲染之前将数据从一个控制器操作转发到另一个控制器操作?基本上,我想现在是否有 Zend _forward 所做的事情?

                Is it possible to forward data from one controller action to other before the render? Basically, I want to now if we have something that Zend _forward does?

                这是我的场景.我有一个支付网关,将数据返回给我的控制器操作,我想要的是处理单独的控制器/操作上的数据,但呈现主页(没有重定向).是否可以将控制从一个控制器/动作转发到另一个控制器?

                Here is my scenario. I have a payment gateway that returns data back to my controller action, what I want is to handle data on separate controller/action but render the home page (without redirection). Is it possible to forward control from one controller/action to other ?

                有人可以建议我去吗?

                推荐答案

                在 Yii 2 中,你可以使用这个产生与 forward() 相同的结果:

                In Yii 2, you can use this which yields the same result of forward():

                Yii::$app->runAction('new_controller/new_action', ['param1'=>'value1', 'param2'=>'value2']);
                

                这篇关于在 Yii2 中将数据从一个控制器动作转发到另一个控制器动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Is Joomla 2.5 much faster than Joomla 1.5 Querywise(Joomla 2.5 比 Joomla 1.5 Querywise 快得多吗)
                How to share Joomla login session from one joomla website to one ASP.Net MVC website(如何将 Joomla 登录会话从一个 joomla 网站共享到一个 ASP.Net MVC 网站)
                htaccess redirect root to subdirectory but allow index.php in root AND query strings to function(htaccess 将根重定向到子目录,但允许根和查询字符串中的 index.php 起作用)
                Joomla include database functions(Joomla 包含数据库功能)
                nl2br() not working when displaying SQL results(显示 SQL 结果时 nl2br() 不起作用)
                Joomla 2.5 JFactory::getSession(); seems to be caching in firefox(Joomla 2.5 JFactory::getSession();似乎在 Firefox 中缓存)

                  • <i id='mMBJL'><tr id='mMBJL'><dt id='mMBJL'><q id='mMBJL'><span id='mMBJL'><b id='mMBJL'><form id='mMBJL'><ins id='mMBJL'></ins><ul id='mMBJL'></ul><sub id='mMBJL'></sub></form><legend id='mMBJL'></legend><bdo id='mMBJL'><pre id='mMBJL'><center id='mMBJL'></center></pre></bdo></b><th id='mMBJL'></th></span></q></dt></tr></i><div id='mMBJL'><tfoot id='mMBJL'></tfoot><dl id='mMBJL'><fieldset id='mMBJL'></fieldset></dl></div>
                  • <small id='mMBJL'></small><noframes id='mMBJL'>

                      <tbody id='mMBJL'></tbody>

                    • <tfoot id='mMBJL'></tfoot><legend id='mMBJL'><style id='mMBJL'><dir id='mMBJL'><q id='mMBJL'></q></dir></style></legend>
                        <bdo id='mMBJL'></bdo><ul id='mMBJL'></ul>