最近还能用XMLHttpRequest方法静态化网页吗?
程序是一样样的,放在服务器上就可以静态化ASP的页面
但放在本地测试就没有反应,也不报错,反正把IIS拖死!
源代码如下,大家帮忙分析下原因!
测试的时候好像 objXmlHttp.send() 这句不行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><% dim strUrl,Item_Classid,id,FileName,FilePath,Do_Url,Html_TempDim iHtml_Temp="<UL>" Html_Temp = Html_Temp&"<LI>" Item_Classid = i FileName = "aaa.html" FilePath = Server.MapPath("/")&"\"&FileName Html_Temp = Html_Temp&FilePath&"</LI>"Do_Url = "http://192.168.0.15/openbadminton.asp" strUrl = Do_Url dim objXmlHttp set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")objXmlHttp.open "GET",strUrl,false objXmlHttp.send() Dim binFileData binFileData = objXmlHttp.responseBody Dim objAdoStream set objAdoStream = Server.CreateObject("ADODB.Stream") objAdoStream.Type = 1 objAdoStream.Open() objAdoStream.Write(binFileData) objAdoStream.SaveToFile FilePath,2 objAdoStream.Close() Html_Temp = Html_Temp&"</UL>" %> <% Response.Charset="utf-8"Response.Write ( "成功生成文件:" ) Response.Write ( "<BR>" ) Response.Write Html_Temp %>