Home > front end >  Generate HTML the cover letter
Generate HTML the cover letter

Time:11-02

<%
Dim strUrl, FileName, FilePath Do_Url, Html_Temp
Html_Temp="& lt; UL>"
For I=1 To 5
Html_Temp=Html_Temp & amp;"
  • "
    Item_Classid=I
    FileName="Index. HTM"
    FilePath=Server. MapPath ("/") & amp;"/"& amp; FileName
    Html_Temp=Html_Temp & amp; FilePath&"
  • "
    Do_Url="http://"
    Do_Url=Do_Url & amp; Request. ServerVariables (" SERVER_NAME ") & amp;"/index. The asp
    "Do_Url=Do_Url & amp;" ? Item_Classid="& amp; Item_Classid
    StrUrl=Do_Url
    Dim objXmlHttp
    The set objXmlHttp=Server. CreateObject (" Microsoft. XMLHTTP ")
    ObjXmlHttp. Open "GET", strUrl, false
    ObjXmlHttp. The send ()
    Dim binFileData
    BinFileData=https://bbs.csdn.net/topics/objXmlHttp.responseBody
    Dim objAdoStream
    The set objAdoStream=Server. CreateObject (" ADODB. Stream ")
    ObjAdoStream. Type=1
    ObjAdoStream. The Open ()
    ObjAdoStream. Write (binFileData)
    ObjAdoStream. SaveToFile FilePath, 2
    ObjAdoStream. Close ()
    Next
    Html_Temp=Html_Temp & amp;"
      "
      % & gt;
      <%
      Response. Write (" successfully generated file: ")
      Response. Write (" & lt; BR>" )
      Response. Write Html_Temp
      % & gt;



      The code above, I'd like to change to the root directory of the index. The asp directly generate HTML file, how to change?
    •  Tags:  
    • ASP
    • Related