如何获取饼干价值
创建饼干
session_start();
$params = session_get_cookie_params();
setcookie(session_name('USERNAME'),'HAMZA',1,
isset($params['path']),
isset($params['domain']),
isset($params['secure']),
isset($params['httponly']));
session_regenerate_id(true);
echo "COOKIE IS CREATED SUCCESSFULLY !";
现在获取 Cookie 值
session_start();
$NAME=$_COOKIE['USERNAME'];
echo $_COOKIE["USERNAME"];
if(isset($NAME))
{
if($NAME=='USERNAME')
{
echo "success";
}
else
{
echo "error";
}
}
请帮帮我!
结果
为什么他们创建自动随机值:u8omuum6c9pkngrg4843b3q9m3)。但我想得到我的原始COOKIE值,这是“HAMZA”?????