识别每个用户的功能? [英] Function to identify each user?

查看:78
本文介绍了识别每个用户的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的页面中,我希望每个用户都获得一个唯一的ID(即使他们转到另一个页面然后再回来也会保留),除非他们点击命名为以其他用户身份输入。现在在我的页面的开头,我使用

In my page I want each user to get a unique id (which stays even if they go to another page and then come back) except when they click named "enter as other user". right now in the beginning of my page I use

展开 | 选择 | Wrap | 行号

推荐答案

@ mikek12004


er,不。这是什么会议的目的。如果你关闭浏览器,会话只会丢失,如果没有设置会话cookie(也就是会话ID丢失),这是在 php.ini 中设置的。会话将一直持续到会话生命周期结束(但只能使用正确的会话ID访问数据)。
@mikek12004
er, no. that?s what sessions are for. if you close the browser, the session is only lost, if no session cookie is set (aka the session id is lost), which is set in php.ini. the session will continue until the session lifetime is over (but data can only be accessed using the correct session id).


嗯...有点丢失你我看到的东西就是每当我关闭 - 重新打开浏览器时,第一种方式(只有会话)id就会改变,所以我看到会话变量消失了(我不想发生这种情况)所以朋友建议GetCartId真正的
hmmm...kinda lost you the thing I saw was that with the first way (only sessions) the id changed whenever I closed-reopend the browser so I saw that the session variables disappears (something that I do not want to happen) so a friend suggested the GetCartId in which truly the


a保持不变,即使我销毁会话甚至取消了coockie(检查我的上一篇文章的下半部分)
a returned by this fuctions stays the same but even when I destroy the session and even unset the coockie (check the 2nd half of my prev post)


这篇关于识别每个用户的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆