在debug调试时,以下代码起作用。能正确赋值。但是如果是在浏览器正常运行,就赋值失败。
打印出:$_SESSION['active_code'] 时,其值等于'3a'.请问是咋回事?调试几个小时了。调试全部正常。但是正常运行就没有值。
$_SESSION['active_code']['id']=$user_id; $_SESSION['active_code']['name']=$user['user_name']; $_SESSION['active_code']['email']=$user['email'];
你是怎么打印的?
$_SESSION['test']='testvv'; $_SESSION['test']['11']='11testvv'; $_SESSION['active_code']['id']=$user_id; $_SESSION['active_code']['name']=$user['user_name']; $_SESSION['active_code']['email']=$user['email']; $_SESSION['active_code']['key']=$this->md5s($user['email'].$user['passwd']); $this->logs(var_export($_SESSION['active_code'],true)); $this->logs(var_export($_SESSION,true));
不知道你的 logs 方法里面做了什么
你直接 var_export($_SESSION['active_code']); 看看
问题解决,删除session目录中所有文件后解决。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号