Magento1的Controller里无法用redirect函数跳转

4.54K 浏览M1交流区

Magento1的Controller里无法用redirect函数跳转

Controller是继承的Mage_Core_Controller_Front_Action

前端访问函数对应的路由时,在这个函数里设置的跳转不起作用,单纯的就这一句函数也不做跳转:

$this->_redirect('checkout/onepage/success');

试了下面的方式也不做 跳转:

Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl());

也没有任何 报错信息。

0

用这种 方式就可以跳转:
header("Location:".Mage::getBaseUrl());

0
您正在查看2个回答中的1个,单击此处查看所有回答。