ASP调用时间的写法

来源:百度知道 编辑:UC知道 时间:2024/06/16 23:39:48
Sub ShowLoginInfo()
dim username,userinfo,LastLogin
username=Request.Cookies("username")
LastLogin=【这里应该等于多少啊?数据库中的字段是lastlogin】
md5old=1
userinfo=split(lc.userinfo(username),"|||")
With Response
.Write "document.write('<div style=""margin-left:18px;"">欢迎您:<font color=red><b>" & Username & "</b></font>   您上次登陆时间:<font color=red><b>" & LastLogin & "</b></font>');" & vbCrLf

把你确认登陆的的代码贴出来

上次登陆时间,应该是写入数据库的,要与数据库连接,得到一个conn连接对象

有了连接对象后,可用:
set rs=conn.execute("select lastlogin from [用户表名] where username='"&username&"'")
if not rs.bof then
LastLogin=rs("lastlogin")
end if

百度消息我。。

啊啊啊 。数据库读取,楼上的,可以借鉴。