session中值为0将转换为false的问题
A页面
<br /> /*判断SESSION是否开启*/<br /> if(session_id() ? false : true)<br /> session_start();<br /> $_SESSION['uid'] = 0;<br /> $_SESSION['username'] = 'admin';<br />
<br /> /*判断SESSION是否开启*/<br /> if(session_id() ? false : true)<br /> session_start();<br /> print_r($_SESSION);<br /> var_dump($_SESSION['uid']);<br />
<br /> Array ( [uid] => [username] => admin ) bool(false)<br />