标题:请高手帮我看看下面的代码有什么错误
只看楼主
mayaojie
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2009-12-27
结帖率:0
已结贴  问题点数:20 回复次数:1 
请高手帮我看看下面的代码有什么错误
是用来显示最新文章的

请高手帮我看看下面的代码有什么错误,
打开的时候显示:
microsoft vbscript compliation error '800a03f6'
expected'end'
/new.asp,line 36


下面是代码

<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
        set rs = server.createobject("adodb.recordset")
    sql="select top 80 * from article order by dateandtime desc"
    rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "没有任何文章<br/>"
else
If Request.QueryString("Page") = "" or Request.QueryString("Page") <= 0 then   
Page = 1
Else
Page = CINT(Request.QueryString("Page"))
End If
rs.pagesize =10
total  = rs.RecordCount
rs.absolutepage=page
mypagesize = rs.pagesize
    dim i
           i=1
    do while not rs.eof and i<=mypagesize
        if rs("articleon")=0 then
    response.write "<a href='list.asp?id="&rs("articleid")&"'>"&((page-1)*10+i)&"."&untow(rs("title"))&"</a><br/> "
        end if
        if rs("articleon")=1 then
        response.write "<a href='lianjie.asp?id="&rs("articleid")&"'>"&((page-1)*10+i)&"."&untow(rs("title"))&"</a><br/>"
        end if
        if rs("articleon")=2 then
        response.write "<a href='softdown.asp?id="&rs("articleid")&"&amp;aid="&rs("classid")&"&amp;bid="&rs("Nclassid")&"'>"&((page-1)*10+i)&"."&c2u(rs("title"))&"</a><br/>"
        end if
%>
<%
i=i+1
rs.movenext
loop
%>
搜索更多相关主题的帖子: 代码 
2009-12-27 19:23
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:20 
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
set rs = server.createobject("adodb.recordset")
sql="select top 80 * from article order by dateandtime desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
   response.write "没有任何文章<br/>"
else
   If Request.QueryString("Page") = "" or Request.QueryString("Page") <= 0 then   
      Page=1
   Else
      Page=CINT(Request.QueryString("Page"))
   End If
   rs.pagesize =10
   total=rs.RecordCount
   rs.absolutepage=page
   mypagesize=rs.pagesize
   dim i
   i=1
   do while not rs.eof and i<=mypagesize
      if rs("articleon")=0 then
         response.write "<a href='list.asp?id="&rs("articleid")&"'>"&((page-1)*10+i)&"."&untow(rs("title"))&"</a><br/> "
      end if
      if rs("articleon")=1 then
         response.write "<a href='lianjie.asp?id="&rs("articleid")&"'>"&((page-1)*10+i)&"."&untow(rs("title"))&"</a><br/>"
      end if
      if rs("articleon")=2 then
         response.write "<a href='softdown.asp?id="&rs("articleid")&"&amp;aid="&rs("classid")&"&amp;bid="&rs("Nclassid")&"'>"&((page-1)*10+i)&"."&c2u(rs("title"))&"</a><br/>"
      end if
      i=i+1
      rs.movenext
   loop
%>
End IF在哪?
2009-12-27 21:02



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-294446-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.089674 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved