本文介绍了检查是否启用了cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在处理一个需要JavaScript和会话的页面.我已经有代码来警告用户是否禁用了javascript.现在,我想处理禁用cookie的情况,因为会话ID存储在cookie中.
I am working on a page that requires javascript and sessions. I already have code to warn the user if javascript is disabled. Now, I want to handle the case where cookies are disabled, as the session id is stored in cookies.
我想到的只是几个主意:
I have thought of just a couple ideas:
- 将会话ID嵌入链接和表单中
- 警告用户必须禁用cookie(如果需要禁用cookie,这将需要帮助,以检测cookie是否被禁用)
解决此问题的最佳方法是什么?谢谢
What is the best way to approach this? Thanks
- Detecting if the cookies are enabled with PHP
这篇关于检查是否启用了cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!