开发者

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

开发者 https://www.devze.com 2023-01-17 13:05 出处:网络
Is there a way to check if the cookie is 开发者_开发问答httponly in php?I don\'t think that\'s possible, because this information is not included in the raw headers sent by the browser. In fact, it do

Is there a way to check if the cookie is 开发者_开发问答httponly in php?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消