duanbushi1867 2010-07-04 08:11
浏览 59


How do you get a cookies params? The "expire, secure, httponly" etc.
Is it possible?

  • 写回答

3条回答 默认 最新

  • dongsonghen9931 2010-07-04 08:18

    There isn't a way to get when a cookie is set to expire or any of the other parameters you are asking for using PHP. This is because PHP doesn't store anything like that, when you are setting a cookie, you are basically saying to output a header to the browser only once, then it's the job of the client (a browser) to send back the cookie data on each HTTP request. PHP therefore has no reason to retain the data, so it doesn't.

    You can of course store when the cookie will expire in another cookie or a file somewhere, if you know where in your code the cookies are being set.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 remotes安装提示没有description文件
  • ¥15 AttributeError: 'NoneType' object has no attribute 'drop_duplicates'报错
  • ¥15 编写c++计算器,用类和栈来做,要求如下
  • ¥15 以下代码,运行结果报错
  • ¥15 Vivado仿真数据出错
  • ¥15 银河麒麟不支持vant等前端框架怎么办?
  • ¥15 vue3的子组件在父页面调用不显示不生效问题
  • ¥15 cadence PEX
  • ¥15 phython创建了文件 显示在项目下面,但运行不了,运行时还是运行main文件,并且说main文件不允许并行运行
  • ¥15 FutureWarning:不推荐使用空或全 NA 条目的 DataFrame 串联行为。怎么改呢?