当我想在页面中输出几秒钟的消息然后将用户重定向到不同的页面时,我遇到了障碍。 我知道我们可以像header("Refresh:4; url=http://www.targeturl.com");
一样使用普通的 PHP 来做到这一点如何在 Zend Framework 中做同样的事情?谢谢。
要么在重定向之前进入睡眠
状态sleep(4);
$this->view->_redirect('http://www.targeturl.com');
或使用元刷新
$this->headMeta()->appendHttpEquiv('Refresh', '4;URL=http://www.targeturl.com');
我认为后者是你所追求的。