Is there a way to check if a cookie is httponly in PHP

强颜欢笑 提交于 2019-12-12 10:36:23

问题


Is there a way to check if the cookie is httponly in php?


回答1:


Well, yes. You'll find it in the array returned by session_get_cookie_params, as long as your PHP is 5.2.0 or newer.




回答2:


I don't think that's possible, because this information is not included in the raw headers sent by the browser. In fact, it doesn't make sense to send flags like these back to the server, because they are meaningless to the server and only wastes bandwidth.



来源:https://stackoverflow.com/questions/3779818/is-there-a-way-to-check-if-a-cookie-is-httponly-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!