<% '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' subject : Asp 创建静态文件/HTML By Stabx ' ' writer : Stabx<shawl.qiu@gmail.com> ' ' blog : http://btbtd.exblog.jp/ ; ' ' blog/site : Phoenix.GI - P.GI / / 绿色学院 - Green Institute ' ' date : 2006-5-22 ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Set rs = Server.CreateObject("ADODB.Recordset") sql = "select top 10 * from (select top 3500 * from ctarticle order by articleid asc) order by articleid desc" '子查询, 目前被认为比恐龙还恐龙 rs.Open sql, MM_conn_string,1 while not rs.eof '循环创建查询的全部记录为 HTML 文件 cid_=rs("classid") ncid_=rs("nclassid") aid_=rs("articleid") adt_=rs("dateandtime") tt_=rs("title") ct_=rs("content") 'em_=htmlToText(rs("email")) 'ht_=rs("hits") 'url_=rs("url") 'src_=rs("www") 'au_=htmlToText(rs("writer"))
response.write "<a href=""" & cid_ & "_"&ncid_&"_"&aid_&".htm"" target=""_blank"">"&cid_ & "_"&ncid_&"_"&aid_& ".htm</a> created at " & now() & "<br>" '链接创建好的文件