保存会话值-然后头重定向
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了保存会话值-然后头重定向相关的知识,希望对你有一定的参考价值。
The problem is some times the redirect may kick you off to the next page before all the session variables have been saved. The true solution to lost session vars on redirect is to simply call session_write_close(); before setting the redirect header. This will insure that php finishes writing the session info before page redirect gets underway.
<? $_SESSION['forward'] = "This session data will not be lost!"; ?>
以上是关于保存会话值-然后头重定向的主要内容,如果未能解决你的问题,请参考以下文章