我看手册上那段意思好象是如果不关闭就不能写入文件~~~因为有一个锁定的问题~~~ 楼主看看这样能行不~$_SESSION["temp"] = "temp"; $temp = $_SESSION["temp"]; session_write_close(); session_start(); $_SESSION["temp"] = $temp;不过好象没这个必要~~~ Session data is usually stored after your script terminated without the need to call session_write_close(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time. When using framesets together with sessions you will experience the frames loading one by one due to this locking. You can reduce the time needed to load all the frames by ending the session as soon as all changes to session variables are done. 引入这个函数似乎是为了加快程序~~~
$_SESSION["..."]="..."不就可以?
这个只是赋值,并未写入文件
不写入吗,不是吧。
我觉得用这个就可以的。
楼主看看这样能行不~$_SESSION["temp"] = "temp";
$temp = $_SESSION["temp"];
session_write_close();
session_start();
$_SESSION["temp"] = $temp;不过好象没这个必要~~~
Session data is usually stored after your script terminated without the need to call session_write_close(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time. When using framesets together with sessions you will experience the frames loading one by one due to this locking. You can reduce the time needed to load all the frames by ending the session as soon as all changes to session variables are done. 引入这个函数似乎是为了加快程序~~~