没有合适的资源?快使用搜索试试~ 我知道了~
首页统计用户在线时间统计用户在线时间
统计用户在线时间统计用户在线时间

用ASP统计用户在线时间,我找到的一个很实用的代码说明,现在推荐给大家。
资源详情
资源评论
资源推荐

用 ASP 统计用户在线时间
ASP Session 技术
使用 ASP Session 是要求你把这个 session 开始的当前时间保存成那个用户的 session
级别变量,这将要用到你的站点或虚拟路径下的 global.asa 文件中的 Session_onStart 事
件句柄。然后,在 Session_onEnd 事件句柄中,你就可以计算出 session 持续的时间,并
将这个结果写到日志文件或数据库中。在这里的例子中使用了日志文件:
< script language="VBScript" runat="server" >
Sub Session_onStart()
'save the time that the session started
Session("StartTime") = Now()
End Sub
Sub Session_onEnd()
'get the time that the user last loaded a page
'assumes the default session timeout of 20 minutes
On Error Resume Next
'set path and name of log file to be created
'edit to suit your own machine directory layout
'remember to give the directory Write or Full
'Control permission for the IUSR_machine account


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论4