bool setcookie ( string $name [, string $input="" [, int $expire=0 [, string $path="" [, string $domain="" [, bool $secure=false [, bool $httponly=false ]]]]]] )
它用来设置cookie
Sr.No | 参数 & Description |
---|---|
1 |
name 它包含cookie的名称。 |
2 |
input 它包含端口号。 |
3 |
errno 它包含有关cookies输入的信息。 |
4 |
expire 它包含有关Cookie的到期时间信息 |
5 |
path 链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-setcookie.html 来源:LearnFk无涯教程网 它包含有关cookies路径的信息,其中服务器。 |
6 |
domain 它包含域信息。 |
如果cookie成功运行,则它将返回TRUE,否则将返回FALSE
<?php $input='It contains Name of the cookies'; setcookie("TestCookie", $input); setcookie("TestCookie", $input, time()+3600); setcookie("TestCookie", $input, time()+3600, "/~rasmus/", "tutorialpoint.com", 1); ?>
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)