您现在的位置: 万盛学电脑网 >> 程序编程 >> 网络编程 >> asp编程 >> 正文

在线人数写法

作者:佚名    责任编辑:admin    更新时间:2022-06-22

<%
user=request.cookies("21bbsusername")
totaluser=application("user")
if instr(totaluser,user)=0 then
application.lock
application("user")=totaluser&";"&user
application.unlock
end if
%>
<html>
<head>
<meta http-equiv="refresh" content="2">
</head>
<body>
</body>
</html>
最后显示在线人数。
user=split(application("user"),";")
num=ubound(user)
response.write num