如何在網(wǎng)頁(yè)中添加最近瀏覽網(wǎng)頁(yè)的IP和時(shí)間的代碼?
ip = Request.ServerVariables("REMOTE_ADDR") '獲取訪(fǎng)問(wèn)者的IPnow_time = now '獲取登陸時(shí)間(服務(wù)器時(shí)間)完整的代碼如下dim conn,rs,ip,now_timeset conn=Server.CREATEOBJECT("ADODB.CONNECTION"
)DBPath = Server.MapPath("數(shù)據(jù)庫(kù)路徑")conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPathset rs=server.CreateObject("adodb.recordset"
)sql = "表名"rs.open sql,conn,3,2rs.addnewip = Request.ServerVariables("REMOTE_ADDR") '獲取訪(fǎng)問(wèn)者的IPnow_time = now '獲取登陸時(shí)間(服務(wù)器時(shí)間)rs("字段名1") = iprs("字段名2") = now_timers.update