七个字的经典唯美句子:asp怎样生成html?

来源:百度文库 编辑:高考问答 时间:2024/05/03 03:25:51
asp怎样生成html?

方法有很多。
<%
filename="index.html"
function ichange(str)
finalstr = ""
for i = 1 to lenb(str)
icharcode = ascb(midb(str,i,1))
if icharcode < &H80 then
finalstr = finalstr & chr(icharcode)
else
inextcode = ascb(midb(str,i+1,1))
finalstr = finalstr & chr(clng(icharcode) * &H100 + cint(inextcode))
i = i + 1
end if
next
ichange = finalstr
end function

'Url="http://";&Request.ServerVariables("blog/index1.asp")
url="http://kuhanzhu.512j.com"
set iconnect = createobject("Microsoft.XMLHTTP")
Html = iconnect.open ("GET",url,false)
iconnect.send()
Html = ichange(iconnect.responsebody)
if html<>"" then
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(""&filename&""))
fout.Write html
fout.close
set fout=nothing
set fso=nothing
response.write"生成 "&url&" 成功!"
else
response.write"模版丢失!"
end if
%>