有关FSO的简单又让我恼火的问题!!!!!!
数据库中有一百条记录
自动生成的静态的*.htm中的*为数据库中的ID,ID是自动编号的
也就是生成了1.htm,2.htm,......100.htm这么100个html网页
但它网页的内容切是1.htm是welcome!,2.htm就有2个welcome!......100.htm就是100个welcome!
这是为什么啊!!
我要的是每个网页都只有1个welcome!啊
大概的代号如下:
麻烦大家帮帮忙!!!!!
<%
'...数据库的连接
strsql=".."
set rs=server.createobject("adodb.recordset")
strsql="select * from test1"
rs.open strsql,strcon,1,3
while not rs.eof
htm=htm&"<HTML><HEAD><TITLE>珊珊</TITLE>"
htm=htm&"<HEAD>"
htm=htm&"<BODY bgColor=#333333>"
htm=htm&"welcome!"
htm=htm&"</BODY></HTML>"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set type_x = fso.CreateTextFile(server.mappath("../htm/"&rs("id")&".htm"))
type_x.WriteLine htm
set fso = nothing
type_x.close
rs.movenext
wend
rs.close
set rs=nothing
response.write "操作完成!"
%>