欢迎光临
我们一直在努力

用asp显示当前在线用户信息,不是简单只显示人数那种![2](转)

建站超值云服务器,限时71元/月

原作者:东子

在你要再线人数显示的地方的页首添加
<%@ language=vbscript %>
<% option explicit %>
在你要再线人数显示的地方
<!– #include file="show_count.asp" –>
详细列表
<!– #include file="show_users.asp" –>

这里是show_users.asp的原程序
<%
if rstactiveusers.recordcount > 0 then
    rstactiveusers.movefirst

    response.write "<table border=""1"">" & vbcrlf

    response.write " <thead>" & vbcrlf
    response.write "  <th>session id</td>" & vbcrlf
    response.write "  <th>ip address</th>" & vbcrlf
    response.write "  <th>user agent</th>" & vbcrlf
    response.write "  <th>session start time</th>" & vbcrlf
    response.write " </thead>" & vbcrlf

    do while not rstactiveusers.eof

        response.write " <tr>" & vbcrlf
        response.write "  <td>" & rstactiveusers.fields("id").value & "</td>" & vbcrlf
        response.write "  <td>" & rstactiveusers.fields("ip").value & "</td>" & vbcrlf
        response.write "  <td>" & rstactiveusers.fields("browser").value & "</td>" & vbcrlf
        response.write "  <td>" & rstactiveusers.fields("started").value & "</td>" & vbcrlf
        response.write " </tr>" & vbcrlf
        
        rstactiveusers.movenext
    loop
    response.write "</table>" & vbcrlf

end if
%>

这里是show_count.asp的原程序
<b><font color="#cc0000"><%= rstactiveusers.recordcount %></font> 在线用户</b>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用asp显示当前在线用户信息,不是简单只显示人数那种![2](转)
分享到: 更多 (0)