关于asp自动生成html并覆盖原html

[复制链接]
查看11 | 回复1 | 2009-6-10 11:59:02 | 显示全部楼层 |阅读模式
"" then
content=read
call makeindex()
end if
sub makeindex()
Set Fso = Server.CreateObject("Scripting.FileSystemObject")
Filen=Server.MapPath("index.html")
Set Site_Config=FSO.CreateTextFile(Filen,true, False)
Site_Config.Write content
Site_Config.Close
Set Fso = Nothing
Response.Write("")
end sub
Function getHTTPPage(url)
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate4 then

exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number0 then err.Clear
End function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
%>
这段代码可生成html.但生成后。以后生成就无法覆盖了。请懂的帮帮忙。谢谢

回复

使用道具 举报

千问 | 2009-6-10 11:59:02 | 显示全部楼层
4 then
exit function end if getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")set http=nothingif err.number0...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行