且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

不保留 PHP 会话变量

更新时间:2023-11-27 23:26:16

会话 ID 必须以某种方式携带,以便同一个会话可以在多个页面上使用.通常,这是通过 cookie 完成的(参见 session.use_cookies),但也可以在 URL 或表单中完成(请参阅 session.use_trans_sid).

The session ID has to be carried along in some way in order that the same session can be used over several pages. In general this is done with a cookie (see session.use_cookies) but it can also be done in the URL or in forms (see session.use_trans_sid).

因此首先您必须确保会话 ID 被传输,以便 PHP 可以加载正确的会话和会话数据.

So first you have to make sure that the session ID is transmitted so that PHP can load the right session and session data.

另见我对 PHP 会话的理解是否正确?