哪位高手帮我看看,问题究竟出在哪里?一运行下面的程序,服务器医生就发出警告,说是占用1500多的内存。。。。。
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40%" height="85"><img src="../Templates/images/news_company.gif" width="135" height="100"></td>
<td width="60%">
<img border="0" src="images/1.jpg" width="456" height="8"></td>
</tr>
</table>
<!--#include file="../admin/conn.asp"-->
<%
const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim pageurl
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql="selec * from xxxx where bigclassname='xxxx' order by newsid desc"
rs.open sql,conn,1,1
%>
<%
if rs.eof and rs.bof then
response.write "<p align='center'></p>"
else
PageUrl="company.asp"
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" height="57">
<tr bgcolor="#Ffffff">
<td valign="left" height="5">
<% if currentPage=1 then
'showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
rs.close
end if
sub showContent
dim i
i=0
%>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100%" height="39" align="center" valign="top" bordercolor="#D2F0FF"> <div align="center">
<table width="90%" cellpadding="0" bordercolor="#8CDBFF" class="d" style="border-collapse: collapse" border="1">
<%do while not rs.eof %>
<tr bordercolor="#8CDBFF" bgcolor="#FFFFFF">
<td width="599" height="20" align="left">· <a href="../show.asp?newsid=<%=rs("newsid")%>" target="_blank"><%=rs("title")%></a><%if rs("image")>0 then%><font color=red>(图)</font><%end if%></td>
<td width="79" align="left"> <%=datevalue(rs("updatetime"))%></td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="middle" height="15">
<%
end sub
rs.close
set rs=nothing
conn.close
set conn=nothing
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<br> "
response.write "<form method=Post action="&filename&">"
response.write "<p align='center'> "
if CurrentPage<2 then
response.write "<font color='#000080'>第一页 上一页</font> "
else
response.write "<a href="&filename&"?page=1>第一页</a> "
response.write "<a href="&filename&"?page="¤tPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"¤tPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>篇文章 <b>"&maxperpage&"</b>篇文章/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=3 maxlength=10 value="¤tpage&">"
response.write "<input class=buttonface type='submit' value='Goto' name='cndok'> </span></p></form>"
end function
%>
</td>
</tr>
</table>