擅长:python、mysql、java
<p>正如您之前所说,在多进程环境(如活动的Apache站点)中,使用全局对象是一种灾难。您将有多个用户都访问彼此的变量,这将永远无法按您的要求工作。在</p>
<p>extraneon是正确的,你应该为此使用会话-这就是它们的用途。从你的评论到他的回答,很明显你没有读过<a href="http://docs.djangoproject.com/en/1.2/topics/http/sessions/" rel="nofollow noreferrer">sessions documentation</a>-你现在应该读了。在</p>