Php 我想重定向到另一个控制器';s动作

Php 我想重定向到另一个控制器';s动作,php,zend-framework,Php,Zend Framework,错误:在/usr/share/php5/Zend/Controller/Dispatcher/Standard.php:248堆栈跟踪:#0/usr/share/php5/Zend/Controller/Front.php(954):Zend_控制器_调度程序_标准->调度(对象(Zend_控制器请求_Http),对象(Zend_Controller_Response_Http))#1/usr/share/php5/Zend/Application/Bootstrap/Bootstrap.php

错误:在/usr/share/php5/Zend/Controller/Dispatcher/Standard.php:248堆栈跟踪:#0/usr/share/php5/Zend/Controller/Front.php(954):Zend_控制器_调度程序_标准->调度(对象(Zend_控制器请求_Http),对象(Zend_Controller_Response_Http))#1/usr/share/php5/Zend/Application/Bootstrap/Bootstrap.php(97):Zend_Controller_Front->dispatch()#2/usr/share/php5/Zend/Application.php(366):Zend_Application_Bootstrap_Bootstrap->run()#3/home/bina/public#html/telco portal testing/public/index.php(22):Zend#应用程序run()#()# 在这里我想重定向phonenumbers控制器的addNew操作,在这里我想传递csv文件的数据 如果(!空($files)){ $name=($files['csvfile']['tmp_name']); $row=1; $handle=fopen($name,“r”); 如果($handle!==FALSE){ while(($data=fgetcsv($handle,1000,“,”)!==FALSE){ $num=计数($data); //echo“$num字段位于第$row行:

\n”; $row++; 对于($c=0;$c<$num;$c++){
在此处输入代码
echo$数据[$c]; } } fclose($handle); } //$this->_forward('addNew','PhoneNumber'); $this->_forward('addnew','phonenumber',null,array($data));

试试这个:

$this->_redirect('/module/controller/action/');

你可以这样试试

$this->_redirect(array('controller'=>'cotroller_name','action' => 'action_name'));

我不熟悉zend framwork…我是说基于cakephp…但我认为它可能工作得很好。

您可以像这样使用helper类,尽管您没有提到您正在使用的框架版本

$this->_helper->redirector->gotoRoute(array('controller'=> 'controllerName','action' =>'actionName'));

exit();
希望这能增加一些