欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

asp 网站静态化函数代码html

程序员文章站 2022-09-02 07:53:56
复制代码 代码如下:function htmll(mulu,htmlmulu,filename,filefrom,htmla,htmlb,htmlc,htmld) if m...
复制代码 代码如下:

function htmll(mulu,htmlmulu,filename,filefrom,htmla,htmlb,htmlc,htmld)
if mulu="" then mulu="/"
if htmlmulu="" then htmlmulu="/"
mulu=replace(sysrootdir&mulu, "//", "/")
htmlmulu=replace(sysrootdir&htmlmulu, "//", "/")
filepath=server.mappath(mulu)&"\"&filename
do_url="http://"
do_url=do_url&request.servervariables("server_name")&htmlmulu&filefrom
do_url=do_url&"?"&htmla&htmlb&"&"&htmlc&htmld
strurl=do_url
set objxmlhttp=server.createobject("microsoft.xmlhttp")
objxmlhttp.open "get",strurl,false
objxmlhttp.send()
binfiledata=objxmlhttp.responsebody
set objxmlhttp=nothing
set objadostream=server.createobject("adodb." & "stream")
objadostream.type=1
objadostream.open()
objadostream.write(binfiledata)
objadostream.savetofile filepath,2
objadostream.close()
set objadostream=nothing
end function