Home > Backend Development > PHP Tutorial > response.addheader uses header to send cookie php code

response.addheader uses header to send cookie php code

WBOY
Release: 2016-07-29 08:36:37
Original
1241 people have browsed it

Use header to send cookies
header("Set-Cookie: testcookie=Chinese; path=/; domain=.phpv.net; expires=".gmstrftime("%A, %d-%b-%Y %H:%M :%S GMT",time()+9600));
Please change path=/; domain=.phpv.net; to your own (delete them if you don’t know how to set them)

The above introduces the PHP code of response.addheader using header to send cookies, including the content of response.addheader. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template