可以通过用url传递参数的办法. 在file1.php里面. 令: $s=session_id(); 然后在url传递$s: file2.php?s=$s 传递后,在file2.php使用: session_id($s); 搞掂.=== session_id (PHP 4 >= 4.0.0) session_id -- Get and/or set the current session id Description string session_id ( [string id]) session_id() returns the session id for the current session. If id is specified, it will replace the current session id. The constant SID can also be used to retrieve the current name and session id as a string suitable for adding to URLs.
在file1.php里面.
令: $s=session_id();
然后在url传递$s:
file2.php?s=$s
传递后,在file2.php使用:
session_id($s);
搞掂.===
session_id
(PHP 4 >= 4.0.0)
session_id -- Get and/or set the current session id
Description
string session_id ( [string id])
session_id() returns the session id for the current session. If id is specified, it will replace the current session id. The constant SID can also be used to retrieve the current name and session id as a string suitable for adding to URLs.
; use transient sid support if enabled by compiling with --enable-trans-sid.
session.use_trans_sid = 1
在Windows环境下把 session.use_trans_sid 改为0却依然可用,不知怎么回事?