Dynamic generation static

xiaoxiao2021-03-06  20

<% Set xml = server.createObject ("Microsoft.xmlhttp") 'Replace the following address to your home file address, must use the absolute path of http: //, can not write relative path XML.Open "Get "," http://china.cnexport.net ", False xml.Send BodyText = xml.ResponseBody BodyText = BytesToBstr (BodyText," gb2312 ") Set xml = NothingDim fso, MyFile Set fso = CreateObject (" Scripting.FileSystemObject " ) Set myfile = fso.createtextfile (Server.Mappath ("aa.htm"), true) myfile.writeline (bodytext) myfile.close

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 = Nothingend function%>

转载请注明原文地址:https://www.9cbs.com/read-42513.html

New Post(0)