Home  >  Article  >  Backend Development  >  用header 发送cookie的php代码_php技巧

用header 发送cookie的php代码_php技巧

WBOY
WBOYOriginal
2016-05-17 09:40:331529browse

用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