【新新手有关问题】cookie赋不了值
程序员文章站
2024-02-11 16:41:16
...
【新新手问题】cookie赋不了值
setcookie( "username ", "aaa ");
setcookie( "userpass ", "bbb ");
echo $HTTP_COOKIE_VARS[ "username "];
echo($userpass);
echo($result[name]);
上面语句只有echo($result[name]);能显示出内容echo $HTTP_COOKIE_VARS[ "username "];和echo($userpass);都无法显示任何东西?请问哪里错了,谢谢!!!
------解决方案--------------------
$_COOKIE[ "username "];
setcookie( "username ", "aaa ");
setcookie( "userpass ", "bbb ");
echo $HTTP_COOKIE_VARS[ "username "];
echo($userpass);
echo($result[name]);
上面语句只有echo($result[name]);能显示出内容echo $HTTP_COOKIE_VARS[ "username "];和echo($userpass);都无法显示任何东西?请问哪里错了,谢谢!!!
------解决方案--------------------
$_COOKIE[ "username "];
相关文章
相关视频