|
作者: flr520 [flr520] 论坛用户 | 登录 |
怎么不能显示呀?帮我改改好吗? <!--#include file="http://www.etianyi.com/kongjian/laban/bbs/conn.asp"--> <% mode = LCASE(Request("mode")) gif = Request("gif") SET rs = Server.CreateObject("ADODB.Recordset") Rs.Open "Select * From counters" ,conn,1,3 if Request.Cookies("IsFirst")=fail then LASTIP = RS("LASTIP") NEWIP = REQUEST.servervariables("REMOTE_ADDR") IF CSTR(Month(RS("DATE"))) <> CSTR(Month(DATE())) THEN RS("DATE") = DATE() RS("YESTERDAY") = RS("TODAY") RS("BMONTH") = RS("MONTH") RS("MONTH") = 1 RS("TODAY") = 1 RS.Update ELSE IF CSTR(Day(RS("DATE"))) <> CSTR(Day(DATE())) THEN RS("DATE") = DATE() RS("YESTERDAY") = RS("TODAY") RS("TODAY") = 1 RS.Update END IF response.Cookies("IsFirst")=true END IF RS("LASTIP")=NEWIP RS("TOTAL") = RS("TOTAL") + 1 RS("TODAY") = RS("TODAY") + 1 RS("MONTH") = RS("MONTH") + 1 RS.Update Session("UserID")=RS("TOTAL") end if t=(cint(day(date()))*24+cint(hour(time())))*60+cint(minute(time())) k=0 i=1 y=0 Do While application("zxip"&i)<>"" if application("zxip"&i)=Request.ServerVariables("REMOTE_ADDR") then application("zxsj"&i)=t y=1 end if if t-application("zxsj"&i)>9 or t<application("zxsj"&i) then k=k+1 else if k>0 then application.lock application("zxip"&i-k)=application("zxip"&i) application("zxsj"&i-k)=application("zxsj"&i) application.unlock end if end if if k>0 then application.lock application("zxip"&i)="" application.unlock end if i=i+1 loop if y=0 then application("zxip"&i)=Request.ServerVariables("REMOTE_ADDR") application("zxsj"&i)=t else i=i-1 end if online=i N = Now D1 = rs("inputdate") ' 开始统计日期(月/日/年) D2 = DateValue(N) D3 = DateDiff("d", D1, D2) response.write "document.write('本站自:"&D1&"起IP访问量 [ ');" response.write "document.write('全部:" GCounter( RS("TOTAL") ) response.write " ');" response.write "document.write('本月:" GCounter( RS("MONTH") ) response.write " ');" response.write "document.write('上月:" GCounter( RS("BMONTH") ) response.write " ');" response.write "document.write('今日:" GCounter( RS("TODAY") ) response.write " ');" response.write "document.write('昨日:" GCounter( RS("YESTERDAY") ) response.write " ] ');" N = Now D2 = DateValue(N) D1 = rs("inputdate") ' 开始统计日期(月/日/年) response.write "document.write('运行:" GCounter( DateDiff("d", D1, D2) ) response.write " 天 ');" D3 = DateDiff("d", D1, D2) response.write "document.write('平均:" GCounter( RS("TOTAL")\D3 ) response.write " 个 ');" rs.Close response.write "document.write('在线:" GCounter(online) response.write " 人');" Function GCounter( counter ) Dim S, i, G S = CStr( counter ) For i = 1 to Len(S) G = G & "" & Mid(S, i, 1) & "" Next response.write G End Function %> |
地主 发表时间: 04-06-14 06:30 |
回复: kailangq [kailangq] 版主 | 登录 |
还是不明白?显示啥? |
B1层 发表时间: 04-06-14 08:20 |
回复: flr520 [flr520] 论坛用户 | 登录 |
站内最新统计呀?对吗?为什么我改了地址他还是不能显示呀???? |
B2层 发表时间: 04-06-14 12:53 |
回复: kailangq [kailangq] 版主 | 登录 |
<!--#include file="http://www.etianyi.com/kongjian/laban/bbs/conn.asp"--> 看看路径对不对,或进conn里看看设置 |
B3层 发表时间: 04-06-14 14:30 |
回复: kailangq [kailangq] 版主 | 登录 |
conn的源码 <% on error resume next dim conn dim dbpath set conn=server.createobject("adodb.connection") DBPath = Server.MapPath("../mdb/蓝雨设计.mdb") conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath %> 或许是你的数据库路径错误,导致无法显示,你改一下数据路径,或你的空间不支持中文,如果你的数据库是中问的,改成英文的看看,然后在改conn文件里的路径! DBPath = Server.MapPath("../mdb/蓝雨设计.mdb") 这个就是 |
B4层 发表时间: 04-06-14 14:34 |
回复: lijingxi [lijingxi] 见习版主 | 登录 |
看看你的IIS是不是支持ASP |
B5层 发表时间: 04-06-15 18:32 |
回复: abctm [abctm] 版主 | 登录 |
改成英文数据库,文件名复杂点如16位的数字字母,符号混合 |
B6层 发表时间: 04-06-15 18:45 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号