0
votes

Error: exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (phonenumber)' in /usr/share/php5/Zend/Controller/Dispatcher/Standard.php:248 Stack trace: #0 /usr/share/php5/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(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_Application->run() #4 {main} In this I want to redirect phonenumbers controller's addNew action And In this I want pass data of csv file if(!empty($files)){ $name = ($files['csvfile']['tmp_name']); $row = 1; $handle = fopen($name, "r"); if ($handle !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); // echo "

$num fields in line $row:

\n"; $row++; for ($c=0; $c < $num; $c++) {enter code here echo $data[$c]; } } fclose($handle); } // $this->_forward('addNew','PhoneNumber'); $this->_forward('addnew','phonenumber',null,array($data));
3

3 Answers

0
votes

Try this:

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

you can try like this..

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

I am not familier with zend framwork....i am saying on base of cakephp.....But i think it may work fine........

0
votes

You can use the helper class like this, though you didn't mention which vesion of the Framework you are using.

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

exit();

Hope that adds some.