描述此代码的功能 [英] Describe function of this code
问题描述
Response.Buffer = True
Dim objXMLHTTP,xml,strHtmlContent
设置xml = CreateObject(MSXML2.ServerXMLHTTP)
xml.OpenGET,strTemplateURL,False
xml.setRequestHeaderContent-Type,text / plain; charset = utf -8
xml.setRequestHeaderCache-Control,no-cache
xml.Send
strHtmlContent = xml.responseText
我可以知道上面的代码实际上是什么意思使用外行术语吗?
对不起,我还是新来的..
我尝试了什么:
我我之前尝试过谷歌,但他们的解释相当困难。
Response.Buffer = True
Dim objXMLHTTP, xml, strHtmlContent
Set xml = CreateObject("MSXML2.ServerXMLHTTP")
xml.Open "GET", strTemplateURL , False
xml.setRequestHeader "Content-Type","text/plain; charset=utf-8"
xml.setRequestHeader "Cache-Control","no-cache"
xml.Send
strHtmlContent=xml.responseText
Hi, Can I know what actually the code above implies using a layman term?
Sorry, Im still new here..
What I have tried:
I tried google before but their explanation quite hard.
推荐答案
它向strTemplateUrl中的url发出Web请求(http),它读取响应并放置内容对strHtmlContent的响应。在其他工作中,它以编程方式导航到URL并将该页面的源放入变量。
要在.net中执行此操作,您将使用某些内容像WebClient。
It makes a web request (http) to the url that is in strTemplateUrl, it reads the response and puts the content of that response into strHtmlContent. In other works, it programatically navigates to the url and puts the "source" of that page into a variable.
To do this in .net you'd use something like WebClient.
这篇关于描述此代码的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!