主题:[原创]跪求计数器代码
hwangzhipeng [专家分:0] 发布于 2006-04-12 22:23:00
大家好,首先感谢您来看我的帖子,谢谢
目前我在淘宝里开了个店铺,我想在店铺里加装个计数器,请问要怎么写代码呢?我不会,请高手指点,谢谢了
回复列表 (共1个回复)
沙发
阿帅 [专家分:240] 发布于 2006-04-15 14:28:00
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>counter</title>
</head>
<body>
<!--#include file="conn.asp" -->
<%dim rs1
set rs1=server.createobject("adodb.recordset")
%>
<%
dim idd
idd=request.querystring("id")
if idd<>"" then
sql="select * from ppt where id like '%"&idd&"%' ORDER BY id DESC "
rs1.open sql,conn,3,3
else
response.write "你的路径不正确!!!地址非法!!! "
response.end
end if
%>
<%'response.write cno%>
<%
rs1("downloadtimes")=rs1("downloadtimes")+1
rs1.update %>
<%'=rs1("downloadtimes")%>
<%'response.redirect rs1("link")%>
<%
dim link
link=rs1("link")
%>
<% rs1.close
conn.close
set conn=nothing
set rs1=nothing%>
<%response.redirect link%>
</body>
</html>
上课去了 晚上回来再具体说明
重要利用的是 重定向 来计数
很简单的
我来回复