heihei1252 / phpsocks5

Automatically exported from code.google.com/p/phpsocks5
0 stars 0 forks source link

能否用PHP SESSION代替数据库? #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
能否用PHP SESSION代替数据库?

如果用数据库的话,数据库读写量很大,而且很多虚拟主机��
�负载不了这么高密度的数据库操作。这也就突显不出PHP到SOCK
S的优势了。
希望能考虑一下,谢谢!

Original issue reported on code.google.com by vastwelk...@gmail.com on 4 Mar 2011 at 11:39

GoogleCodeExporter commented 8 years ago
使用session曾经是phpsocks5的首选方案,可惜PHP的session并不是线
程安全的,甚至每一次访问的php页面中session的数据是不同的�
��本,另一个页面请求中修改了session中的内容,在本次页面��
�求中无论如何也是无法取到的。而phpsocks5有大量操作同一数�
��的行为,也需要不同请求共享数据,这些行为也是必需的,
导致了无法使用session作为数据存储。

Original comment by lehui99 on 5 Mar 2011 at 8:46