猿问

您好,想使用_redirect()?该怎么操作呢?

小弟使用zend_framework+php5.3.0
$this->_forward('/account/registercomplete')出面错误Parse error: syntax error, unexpected T_GOTO, expecting T_STRING in E:\xampp-win32-1.7.2-beta2\xampp\htdocs\zfw\library\Zend\Controller\Action\Helper\Redirector.php on line 364

慕田峪7331174
浏览 186回答 2
2回答

三国纷争

首先redirect不是php内置的函数。而是thinkphp框架里的点击函数可以看到最终是:header('Location: XXX/');的过滤使用方法可以查看手则// 跳转到 edit 操作   $this->redirect('edit');  // 跳转到 UserAction下的edit 操作   $this->redirect('User/edit');  // 跳转到 Admin分组默认模块默认操作  $this->redirect('Admin/');

凤凰求蛊

$this->_forward('registercomplete','account')$this->_redirect('/account/registercomplete');
随时随地看视频慕课网APP
我要回答