<%
'略去连接数据库部分
set rs=server.createobject("adodb.recordset")
sql="select * from 表"
rs.open sql,conn,1,1
if rs.eof or rs.bof then
else
for i=1 to rs.recordcount
int_id=rs("id")
str_title=rs("title")
str_nr=rs("nr")
set fileobj=server.createobject("scripting.filesystemobject")
filepath=server.mappath("htm")&"/"&int_id&".htm"
set filewrite=fileobj.opentextfile(filepath,2,true)
filewrite.write str_nr
set fileobj=nothing
rs.movenext
next
end if
rs.close
set rs=nothing
'关闭数据库
%>
[此贴子已经被作者于2006-8-22 16:58:56编辑过]