首页 > 编程知识 正文

php7 setcookie无效_linux nginx/1.14.1 php7.3 下 setcookie 在chrome浏览器下无效

时间:2023-05-05 05:32:12 阅读:220201 作者:3553

Chrome 73.0.3683.103

把你的真实代码中的 $n 和 $v 贴出来看一下。

header('Content-Type: text/txt');

$n='name';

$v='value';

$t=0;

setcookie($n,$v,$t,"/");//name,value,time

print_r($_SERVER);

Response Headers:

Date: Mon, 15 Apr 2019 05:10:25 jqdxq/p>

Set-Cookie: name=value; path=/

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Array

(

)

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。