PHP session destroyed / lost after header

来源:互联网 发布:mac视频下载插件 编辑:程序博客网 时间:2024/05/20 13:04

在header重定向后,注册的session居然消失了?!

找到解决办法:

After the Header redirect you need to exit the PHP script: 

header("Location: /"); exit();

参考:http://stackoverflow.com/questions/2037316/php-session-destroyed-lost-after-header

0 0