Heim >Backend-Entwicklung >PHP-Tutorial >【新新手有关问题】cookie赋不了值
【新新手问题】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 "];