机战J撒夫尔同盟:关于静态页的问题请教

来源:百度文库 编辑:高校问答 时间:2024/04/27 21:50:57
<!--#include file="conn.asp"-->
<%
if request("add")="add" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from admins"
rs.open sql,conn,1,3
rs.addnew
rs("username")=request("username")
rs("passwd")=request("passwd")
rs.update
response.Write "<script>alert('添加成功,请点击确定');location.href='11.asp';</script>"

filename=year(now)&month(now)&day(now)&minute(now)&".htm"
if request("body")<>"" then
set objfso = Server.CreateObject("Scripting.FileSystemObject")
set htmout = objfso.CreateTextFile(server.mappath("news/"&filename))
htmout.write "<html><head><title>"
htmout.write request.form("title")
htmout.write "</title></head><body>新闻标题:"
htmout.write "&rs("username")&"
htmout.write "<br>内容(body):"
htmout.write "&rs("passwd")&"
htmout.write "</body></html>"
htmout.close
set htmout=nothing
set objfso=nothing

end if
end if
%>
这句话应该怎么写,我不会,麻烦帮帮忙。
这是一个FSO静态生成,我在前页输入数据,这一页为传递数据页,我能成功添加到数据库里面,但不能生成静态页,麻烦帮帮忙啊!

有动态的是实时的比如BBS,特征是可以有互动,是高级网站这个知识人就是。而静态的就不行了不能互动等等