Home  >  Article  >  php教程  >  用header 发送cookie的php代码

用header 发送cookie的php代码

WBOY
WBOYOriginal
2016-06-13 12:33:121161browse

用header 发送cookie 
header("Set-Cookie: testcookie=中文; path=/; domain=.phpv.net; expires=".gmstrftime("%A, %d-%b-%Y %H:%M:%S GMT",time()+9600)); 

请将path=/; domain=.phpv.net;改为自己的(不知道怎么设就删除它们] 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn