会话的独特性 [英] uniqueness of session

查看:60
本文介绍了会话的独特性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果来自同一路由器的两台电脑连接到我的网络服务器,每个连接会产生唯一的

会话ID吗?


实际上,有没有文章谈论PHP如何生成会话

cookies?


-

iTech咨询服务有限公司

ePOS解决方案专家

网站: http://www.itech.com.hk (仅限IE)

电话:(852)2325 3883传真:(852)2325 8288

解决方案

Man-wai Chang写道:


>

如果是两台电脑从同一路由器连接到我的网络服务器,将为每个连接生成唯一的

会话ID?


实际上,有没有文章谈论如何PHP生成会话

cookies?



没有我知道的文章。但是你会得到两个不同的会话ID。


如果用户使用两种不同的浏览器,你还会获得两个会话ID

(即IE和Firefox)来自同一台电脑。


-

================ ==

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


我不知道的文章。但是你会得到两个不同的会话ID。


如果用户使用两种不同的浏览器

(即IE和Firefox),你还将获得两个会话ID同一台电脑。



谢谢。猜猜我必须阅读PHP的源代码才能找到它然后

.... :)


-

iTech咨询服务有限公司

ePOS解决方案专家

网站: http://www.itech.com.hk (仅限IE)

电话:(852)2325 3883传真:(852)2325 8288


Man-wai Chang写道:


>没有我知道的文章。但是你会得到两个不同的会话ID。
如果用户在同一台​​计算机上使用两个不同的浏览器(即IE和Firefox),你也会得到两个会话ID。



谢谢。猜猜我必须阅读PHP的源代码才能找到它然后

... :)



它与之无关PHP的源代码。这就是浏览器的工作方式。


浏览器会跟踪会话ID,通常是在cookie中(如果不支持
cookie不支持PHP使用GET参数)。两个不同的
计算机无法共享相同的cookie - 因此会话ID相同。


它与ip地址完全无关(不是独一无二且

可随时更改。


-

=========== =======

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================



If two PCs from the same router connects to my web server, will unique
session IDs be generated for each connection?

In fact, is there an article talking about how PHP generates session
cookies?

--
iTech Consulting Services Limited
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288

解决方案

Man-wai Chang wrote:

>
If two PCs from the same router connects to my web server, will unique
session IDs be generated for each connection?

In fact, is there an article talking about how PHP generates session
cookies?

No article I know of. But you will get two different session id''s.

You''ll also get two session id''s if the user uses two different browsers
(i.e. IE and Firefox) from the same computer.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


No article I know of. But you will get two different session id''s.

You''ll also get two session id''s if the user uses two different browsers
(i.e. IE and Firefox) from the same computer.

Thanks. Guess I have to read the source codes of PHP to find it out then
.... :)

--
iTech Consulting Services Limited
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288


Man-wai Chang wrote:

>No article I know of. But you will get two different session id''s.
You''ll also get two session id''s if the user uses two different
browsers (i.e. IE and Firefox) from the same computer.


Thanks. Guess I have to read the source codes of PHP to find it out then
... :)

It has nothing to do with the source code for PHP. It''s how browsers work.

The browser keeps track of the session id, generally in a cookie (if
cookies aren''t supported PHP uses the GET parameters). Two different
computers cannot share the same cookie - and therefore the same session id.

It has nothing to do with ip addresses at all (which are not unique and
may change at any time).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于会话的独特性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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