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

PHP session destroyed / lost after header

WBOY
WBOY原創
2016-06-06 19:57:161017瀏覽

在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