首页 >php教程 >php手册 >PHP session destroyed / lost after header

PHP session destroyed / lost after header

WBOY
WBOY原创
2016-06-06 19:57:161026浏览

在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

在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

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn