这是我写的代码,看看:
<!--#include file="conn.asp"-->
<%
today1=year(now())&"-"&month(now())&"-"&day(now())
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
end if
if request.Cookies("ipdress")="" then
set rs= server.CreateObject("adodb.recordset")
rs.open "select * from count1 where
date1='"&today1&"'",myconn,1,3
if rs.eof
then
rs.addnew
rs("date1")=today1
response.Write("ddsfds")
rs.update
else
a=int(rs("count1"))+1
myconn.execute "update count1 set count1='"&a&"' where date1='"&today1&"' "
myconn.close
response.Write(a)
end if
response.Cookies("ipdress")=userip
end if
%>