application 如何与session配合统计在线用户信息? 100
<%dimusers,totalusers,userusers=session("username")ifapplication("users")=""Thentotal...
<%dim users,totalusers,user
users=session("username")
if application("users")="" Then
totalusers=users
else
totalusers=application("users")
end if
if instr(totalusers,users)=0 then
application.lock
application("users")=totalusers&";"&users
application.unlock
end if
user=split(application("users"),";")
response.write user%> 展开
users=session("username")
if application("users")="" Then
totalusers=users
else
totalusers=application("users")
end if
if instr(totalusers,users)=0 then
application.lock
application("users")=totalusers&";"&users
application.unlock
end if
user=split(application("users"),";")
response.write user%> 展开
1个回答
展开全部
这样应该就可以实现,没测试,你自己测试看看:
<%
dim users,totalusers,user
users=session("username")
if application("users")="" Then
totalusers=";"&users&";"
else
totalusers=application("users")
if instr(totalusers,";"&users&";")=0 then
application.lock
application("users")=totalusers&users&";"
application.unlock
end if
end if
response.write application("users") '输出所有用户的列表
%>
<%
dim users,totalusers,user
users=session("username")
if application("users")="" Then
totalusers=";"&users&";"
else
totalusers=application("users")
if instr(totalusers,";"&users&";")=0 then
application.lock
application("users")=totalusers&users&";"
application.unlock
end if
end if
response.write application("users") '输出所有用户的列表
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询