ASP生成静态HTML
作者:wang 日期:2009-10-12
录入的内容,自动生成html文件.
程序代码<%
filename=year(now)&month(now)&day(now)&minute(now)&".htm" '根据当前时间生成文件名
if request("body")<>"" then
set objfso = Server.CreateObject("Scripting.FileSystemObject") '创建一个fso实例
set htmout = objfso.CreateTextFile(server.mappath(""&filename&""))
htmout.write ""
htmout.write request.form("title")
htmout.write " 新闻标题:"
htmout.write request.form("title")
htmout.write "
内容(body):"
htmout.write request.form("body")
htmout.write ""
htmout.close
set htmout=nothing
set objfso=nothing
end if
%>
录入的内容,自动生成html文件.
程序代码<%
filename=year(now)&month(now)&day(now)&minute(now)&".htm" '根据当前时间生成文件名
if request("body")<>"" then
set objfso = Server.CreateObject("Scripting.FileSystemObject") '创建一个fso实例
set htmout = objfso.CreateTextFile(server.mappath(""&filename&""))
htmout.write ""
htmout.write request.form("title")
htmout.write " 新闻标题:"
htmout.write request.form("title")
htmout.write "
内容(body):"
htmout.write request.form("body")
htmout.write ""
htmout.close
set htmout=nothing
set objfso=nothing
end if
%>
程序代码<%
filename=year(now)&month(now)&day(now)&minute(now)&".htm" '根据当前时间生成文件名
if request("body")<>"" then
set objfso = Server.CreateObject("Scripting.FileSystemObject") '创建一个fso实例
set htmout = objfso.CreateTextFile(server.mappath(""&filename&""))
htmout.write "
htmout.write request.form("title")
htmout.write "
htmout.write request.form("title")
htmout.write "
内容(body):"
htmout.write request.form("body")
htmout.write ""
htmout.close
set htmout=nothing
set objfso=nothing
end if
%>
录入的内容,自动生成html文件.
程序代码<%
filename=year(now)&month(now)&day(now)&minute(now)&".htm" '根据当前时间生成文件名
if request("body")<>"" then
set objfso = Server.CreateObject("Scripting.FileSystemObject") '创建一个fso实例
set htmout = objfso.CreateTextFile(server.mappath(""&filename&""))
htmout.write "
htmout.write request.form("title")
htmout.write "
htmout.write request.form("title")
htmout.write "
内容(body):"
htmout.write request.form("body")
htmout.write ""
htmout.close
set htmout=nothing
set objfso=nothing
end if
%>
上一篇: ASP图片上传[图片直接存储在数据库里面
下一篇: 使用ASP+MSSQL时添加数据无法获取及时获取ID的解决办法
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
下一篇: 使用ASP+MSSQL时添加数据无法获取及时获取ID的解决办法
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 2194
发表评论