我尝试在模型中设置一个 cookie,但它似乎不起作用。任何想法?
$header = new \Zend\Http\Header\SetCookie();
$header->setName('Token');
$header->setValue($token);
$header->setPath('/');
$header->setDomain('localhost');
$header->setExpires(time()+(3600*24*365));
$client = new \Zend\Http\Client();
$client->addCookie($header);