定义和用法
setcookie() 函数向客户端发送一个 HTTP cookie。
cookie 是由服务器发送到浏览器的变量。cookie 通常是服务器嵌入到用户计算机中的小文本文件。每当计算机通过浏览器请求一个页面,就会发送这个 cookie。
cookie 的名称指定为相同名称的变量。例如,如果被发送的 cookie 名为 "name",会自动创建名为 $user 的变量,包含 cookie 的值。
对 cookie 进行赋值之前不能有任何输。如果成功,则该函数返回 true,否则返回 false。
注意:cookie设置以后必须刷新以后才能生效。
语法
setcookie(name,value,expire,path,domain,secure)
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApkAAAEJCAIAAABQQ6vbAAAgAElEQVR4nO3d62HrKBCGYXVERRRENxSjGrYN7w8JmIFBt5Bg+7zPr5PY1mWk6NOAvLv8999/L9xE0QAAs7QZtBBLD1A0AMAsZPkYFA0AMAtZPgZFAwDMQpaPQdEAALOQ5WNQNADALGT5GBQNADALWT4GRQMAzEKWj0HRAACzkOVjUDQAwCxk+RgUDQAwC1k+BkUDAMxClo9B0QAAszzO8jW4ZeNDcMuy+Fi/7OP2LhfWV/SLC2v6mH7vNzgrmt5v8VOuUJIqJUS/LIsL6xpc8xoA4J/3IMtziu+xEoNLsV5SaY+fuCVVDK6k0TdG+fUsj37pcWHNxVWRnYoZvVu+s3wAgB+4m+UHUbRlkI9bCK3BOR9Flvsom/nU039LLB0VTe11acY7ffnWmfsQfFUrHfoAAOyez5evqde2XjQjfxuM3z4R/Tcl+d0x9lv2WwECHABgu5XlZ0151Wynt6tx96U06N+UTtezvFvE9HiBHrAQMxrBf9PdDwBglCd9+Z5GIor3wBFJs3ft3hgo3h+F+6q2/GKWL8vivU+1K0WQ5VAd/PaCF/H/TUUDAAzxeL68ZJBMJjEJnJ54K+ETvXPbb9bgviyVjopWOvHcl1/K8jyLkT6yLeibhjMAAAPcyfLmybU2VuTj68YYcnqD+7YoHzTGLt7p69sk8ZW+L6sdAOBnfvjfiond0d+SP/opuXaA/ivczPIrffkanBxp3yu2BudCXL+regCAn7id5bo57z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6cik62yiC7Hp5ur9+nyyvn/V72JdXC8v3bXvgNd1tO37UjgpU00Lp4Ubr/L3el5uXkPpio2ZA1M2ouM6Uy5TYaesyJQd9aNLxcW725eVSqe9z2xauCSD9q9Dpy3sreXdPs7y+EDrvT/uyPNh7+L4qO8plq35uebsm5keNelle3pY+1c/yk9Z3v7S6K3u6OHdjGjOtOz9Y/WiM3Whl5SbN6cvldvW223vjb+kgy8ubqr21Hoxp/rhL8hkNuFkkeX5dmNYxLiGyCnWPblRHVDffhOgKGxeba39fwHvh++Vj3Cyadf/T9AXdNLzSN+iLr0yMsm49AN9f79YuX3jb2q5ZbVH9joPYX+SXmE4KcnDzJ3LlaGXJdqlvWzW5Ae85UqQHWbq7V6YizFtwNUIjHWPMa2MAAAClSURBVIyQ2Xd17T2PzPKQnr6zJrSnoy/HByLLx6BoAIBZyPIxKBoAYBayfAyKBgCYhSwfg6IBAGYhy8egaACAWcjyMSgaAGAWsnwMigYAmIUsH4OiAQBmIcvHoGgAgFnI8jEoGgBgFrJ8DIoGAJiFLB+DogEAZrGzHAAAfJA6y//qNgIAAPwKshwAgM9GlgMA8NnIcgAAPhtZDgDAZyPLAQD4bP8DWBP0K+LRPHEAAAAASUVORK5CYII=" alt="" />
提示和注释
注释:可以通过 $HTTP_COOKIE_VARS["user"] 或 $_COOKIE["user"] 来访问名为 "user" 的 cookie 的值。
注释:在发送 cookie 时,cookie 的值会自动进行 URL 编码。接收时会进行 URL 解码。如果你不需要这样,可以使用 setrawcookie() 代替。
例子 1
设置并发送 cookie:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApsAAAEmCAIAAACiTMwFAAAgAElEQVR4nO3du2ojydvH8bofM9SN+AYmqFSZL+DveAIVGIRhUWRYFgnMOFgXMhgHs7AIJ4ZxsOMGgXlvY+J+gz7UsaWW1JqRyt8PYpBafZJs5tfPUyVZlGX53+r/fh7Mf6v/KwEAwHCS2SpKEh0AgJNCogMAkAMSHQCAHJDoAADkgEQHACAHJDo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6AAA5IBEBwAgByQ6AAA5INEBAMjBukTnxo0bN27cuJ3QLZ3oAADg1P0/kh1Ybk1rhwAAAAAASUVORK5CYII=" alt="" />
- setcookie(name,value,expire,path,domain,secure)
参数 | 描述 |
---|---|
name | 必需。规定 cookie 的名称。 |
value | 必需。规定 cookie 的值。 |
expire | 可选。规定 cookie 的有效期。 |
path | 可选。规定 cookie 的服务器路径。 |
domain | 可选。规定 cookie 的域名。 |
secure | 可选。规定是否通过安全的 HTTPS 连接来传输 cookie。 |