怎么才能通过网络赚钱:下面是统计点击排行的

来源:百度文库 编辑:高校问答 时间:2024/04/28 14:44:38
下面是统计点击排行的
<%
sub djph(tab,showpage)
set rstop=server.createobject("adodb.recordset")
if request.querystring("class")<>"" then
sql="select * from ["&tab&"] where pass=true and class="&request.querystring("class")&" order by click DESC"
else
sql="select * from ["&tab&"] where pass=true order by click DESC"
end if
rstop.open sql,conn,1,1
n=0
response.write"<table border='0' cellspacing='0' cellpadding='0' width='100%'>"
do while not rstop.eof
%><tr height=17><td>·<a href='"&showpage&"?id=<%=rstop("id")%>' target='_blank' title="图片名称:<%=rstop("title")%><br>发表会员:<%=rstop("user")%><br>发表时间:<%=rstop("date")%><br>点击次数:<%=rstop("click")%>次"><%=rstop("title")%></a></td></tr>
<%n=n+1
if n=cint(toplist) then exit do end if
rstop.movenext
loop
if rstop.eof and rstop.bof then
response.write "<center><font color=red><b>没有相关图片!<b></font></center>"
end if
response.write "</table>"
rstop.close
set rstop=nothing
end sub%>

在另一个页面调用 <%call djph("YC_pic","showpic.asp")%>

"&tab&"能够置换成YC_pic,"&showpage&"怎么置换不过来呢?

也就是说,"&showpage&"根本没执行, 地址栏是这样的: http://127.0.0.1/"&showpage&"?id=84

<a href='"&showpage&"?id=<%=rstop("id")%>' target='_blank' title="图片名称:<%=rstop("title")%><br>发表会员:<%=rstop("user")%><br>发表时间:<%=rstop("date")%><br>点击次数:<%=rstop("click")%>次"><%=rstop("title")%></a> 这一句要放在<% %>里面,或者用response.write,具体怎么写呢?

我直接在这一句上加<% %>,或者response.write" "可运行不了,不知是怎么回事?

<a href=\'\"&showpage&\"?id=<%=rstop(\"id\")%>\' target=\'_blank\' title=\"图片名称:<%=rstop(\"title\")%><br>发表会员:<%=rstop(\"user\")%><br>发表时间:<%=rstop(\"date\")%><br>点击次数:<%=rstop(\"click\")%>次\"><%=rstop(\"title\")%></a>
把这一句改为下面的即可.
<a href=\'<%=\"\"&showpage&\"\"%>?id=<%=rstop(\"id\")%>\' target=\'_blank\' title=\"图片名称:<%=rstop(\"title\")%><br>发表会员:<%=rstop(\"user\")%><br>发表时间:<%=rstop(\"date\")%><br>点击次数:<%=rstop(\"click\")%>次\"><%=rstop(\"title\")%></a>