在default.asp代码的底部,</html>之后,<script...>JS代码之前,添加如下代码,就可以在首页显示最新发表的文章了:
<%on error resume nextdim conn,rs,sqlset conn=getConn()set rs=getRs()sql="select top 1 * from articles order by [id] desc"rs.open sql,conn,1,1
if not rs.bof and not rs.eof then Index_articID = rs("id")end ifrs.closeconn.closeset rs=nothingset conn=nothing%>