duanbushi1867 2010-07-04 08:11
浏览 59
已采纳

在PHP中获取cookie参数?

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥30 51单片机C语言数码管驱动单片机为AT89C52
  • ¥100 只改动本课件的 cal_portfolio_weight_series(decision_date), 跑完本课件。设计一个信息比率尽量高的策略。
  • ¥20 如何在visual studio 2022中添加ImageMagick库
  • ¥50 如何实现uniapp编译的微信小程序做可回溯视频
  • ¥15 求Houdini使用行家,付费。价格面议。
  • ¥15 前端高拍仪调用问题报错
  • ¥15 想用octave解决这个数学问题
  • ¥15 Centos新建的临时ip无法上网,如何解决?
  • ¥15 海康威视如何实现客户端软件对设备语音请求的处理。
  • ¥15 支付宝h5参数如何实现跳转