如何asp生成html

来源:百度知道 编辑:UC知道 时间:2024/09/21 08:37:26
我把它直接改成html后发现网页不能用了 file 引用文件也没了 页面都有错误代码 怎么回事??????

显然不能直接改,狂晕
直接改了哪里有active sever呢?
<%
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
'把下面的地址替换成你的首页的文件地址,一定要用http://开头的绝对路径,不能写相对路径
xml.Open "GET", "http://www.baidu.com/index.asp", False
xml.Send
BodyText=xml.ResponseBody
BodyText=BytesToBstr(BodyText,"gb2312")
Set xml = Nothing
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile= fso.CreateTextFile(server.MapPath("index.html"), True)
MyFile.WriteLine(BodyText)
MyFile.Close

Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstr