Home > Backend Development > PHP Tutorial > HTTPcookie支持_PHP

HTTPcookie支持_PHP

WBOY
Release: 2016-06-01 12:41:05
Original
843 people have browsed it

Cookie



PHP很明显的支持HTTP cookie。Cookie是一个在远程浏览器上存储数据和跟踪或鉴定返回的用户的结构。您可以使用函数setcookie()来设置cookie。Cookie是HTTP文件头的一部分,所以该Setcookie()函数必须在任何输出向浏览器发送前被调用。这种情况和函数Header()的限制是类似的。

任何从客户计算机发送到您那儿的cookie都将被自动的转化成一个类似于GET和POST方法数据的PHP变量。如果您希望给一个cookie指派多个值,只需要在该cookie的名字后面加上“[ ]”即可。关于更多的细节问题请参看setcookie()函数。


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