哪里错了呢?愁死了
鸣宇淳 博客专家认证 2008-12-07 05:47:34 各位高手,问a.asp页怎么什么也不显示呢?我弄了半天,还是弄不出来。
a.asp页中是这样的:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Inc/Code.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<% call shownews(9)%>
</body>
</html>
-----------------------------------------
-----------------------------------------
Code.asp文件里:
<!--#include file="../conn/conn.asp"-->
<%
sub shownews(cout)
dim strt,sqlc,rsc
sqlc="select top " & cout & " * from shop_news order by adddate desc"
Set rsc= Server.CreateObject("ADODB.Recordset")
rsc.open sqlc,conn,1,1
if rsc.bof and rsc.eof then
response.Write "<br> 对不起,没有最新动态..."
else
rsc.movefirst
rscnum=rsc.recordcount
i=1
do while not rsc.eof
if i<rscnum then
strt=""
else
strt=""
end if
dim tit
tit = rsc("newsname")
if len(rsc("newsname"))>13 then
tit= left(rsc("newsname"),13) & "..."
end if
strt= strt & "<table width=90% border=0 cellpadding=0 cellspacing=0>"
strt= strt & "<tr>"
strt= strt & "<td height=29 align=left >"
strt=strt & "<a href='Product_text.asp?id="&rsc("newsid")&"'>"
strt=strt & tit
strt=strt & "</a></td>"
strt=strt & "</TR>"
strt=strt & "</table>"
response.write strt
rsc.movenext
i=i+1
loop
rsc.close
set rsc=nothing
end if
end sub
%>