I came across to an obstacle for me when i wanted to output a message for couple seconds in the page then redirect the user after to a different page. i know we can do it with plain php as in header("Refresh:4; url=http://www.targeturl.com");
How can i do the same thing in Zend Framework? Thank you.
Either put a sleep before the redirect
sleep(4);
$this->view->_redirect('http://www.targeturl.com');
or use meta refresh
$this->headMeta()->appendHttpEquiv('Refresh', '4;URL=http://www.targeturl.com');
I think the latter is what you are after.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.