Zend 框架会话丢失 [英] Zend framework session lost

查看:36
本文介绍了Zend 框架会话丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个注册表单,当用户注册时,它会将他重定向到他的页面.在 Firefox 和 chrome 中一切正常,但在 Internet Explorer 中.看起来用户信息被保存后,会话结束了,它不会将用户重定向到他的页面.

I have a register form, when user sign up, it will redirect him to his page. All work fine in firefox and chrome, but in internet explorer. It looks like after the user information is saved, the session went off and it won't redirect the user to his page.

如何在 IE 上解决此问题?

How can I fix this issue on IE?

$user = $this->_helper->model('Users')->createRow($signupForm->getValues());   
        if ($user->save())
        {               
            Zend_Session::rememberMe(186400 * 14);
            Zend_Auth::getInstance()->getStorage()->write($user);
            $user->sendSignUpEmail();
            $this->getHelper('redirector')->gotoRoute(array(), 'invite');
            return;
        }

推荐答案

我在重定向前在 IE 上的 iframe 中创建会话时遇到了类似的问题,这对我有用:尝试放入 Zend 操作:

I'v got a similary problem to create session in iframe on IE before a redirection, and this works for me : Try to put in the Zend Action :

$response = $this->getResponse();
$response->setHeader('P3P', 'CP="CAO PSA OUR"', true); 

什么是header('P3P: CP=CAO PSA OUR";');做什么?

这篇关于Zend 框架会话丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆