I`ve problem with session variables on my page.
session_start();
session_regenerate_id();
$_SESSION['test'] = 'test';
When i refresh page first time ['test']
is changing to ["test"]=> 开发者_JAVA技巧&string(4) "test"
, after next refreshing page ["test"]=> &array(0) {}
.
Please help.
Try using session_write_close();
at the bottom of the page...
Are you using a header() redirect or anything of that nature? If so, this function ensures that the session variable is written before changing the page.
You need to set registry_globals = off
to work right. I had the same problem in a rent server. Now everything is ok
精彩评论