我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

php设置cookie到期时间

I am setting a cookie using php's setcookie and the expire value is set to 0. However when I look at the cookie using developer tools it shows the below i.e the expires as 1970 . How do i make the expires time in the future but making the session expire when the browser is closed.

My security team is complaining of this as expired cookies.

enter image description here

近期文章

  • Laravel Spark安装问题
  • 重写多个子域的URL
  • 通过Vue / Axios发送所选按钮名称
  • 如何自定义jAutoCalc插件
  • 更改特定语言的徽标
  • 在php 5.6.23中设置变量值
  • 在PHP中通过URL获取Zip文件
  • 在laravel 4中是否有一种方法可以在fly中创建自定义验证消息
  • 无法从大型表格行中检索记录
  • 将所选数量的每种注册类型添加到数组时,如何解决未定义的索引错误?
  • Laravel 5.6检查并存储多维文件数组问题
  • PHP Facebook返回我自己的照片和视频
  • 尝试将图像存储在上传文件夹中时出错
  • 无法使用JSON将jqxScheduler状态存储到MySQL中
  • 在网址中搜索查询[重复]
  • 在null上调用成员函数bind_param()
  • laravel 5.6将表单数据作为路由参数传递
  • 从php数组插入sqlite行
  • 无法在laravel项目中安装composer
  • 如果值相同,如何对SQL查询结果进行排序?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华