From a website under the ASP generated static page code Script Home Special Edition _ Application Skills

Source: Internet
Author: User
Copy Code code as follows:

<%
Webfolder= "/"
host= "index_cn.asp" ' foreground dynamic address
Folder= "/" folder
Filename= "index_cn.html" generates a static filename
Fso_info Host,folder,filename
Response.Write "Generate Web site Chinese home static HTML complete. <br/>"
' Generate HTML
Function Fso_info (Host,folder,filename)
host= "http://" +request.servervariables ("Http_host") &webfolder&host
If SaveFile ("&folder&filename&" "," "&host&") Then
Response. The Write "&folder&filename&" build succeeded. <br/> "
Else
Response.Write "&folder&filename&" generates <font color= ' #FF0000 ' > failed </font> Your file name may contain special characters .< br/> "
End If
End Function
' Generate file
function SaveFile (Localfilename,remotefileurl)
Dim Ads, retrieval, Getremotedata
On Error Resume Next
Set retrieval = Server.CreateObject ("Microso" & ft.) XM "&" Lhttp ") '//Take apart the word to prevent the killing of antivirus software
With retrieval
. Open "Get", Remotefileurl, False, "", ""
. Send
Getremotedata =. Responsebody
End With
Set retrieval = Nothing
Set Ads = Server.CreateObject ("Ado" & "db.") Str "&" Eam ") '//Take apart the word to prevent the killing of antivirus software
With Ads
. Type = 1
. Open
. Write Getremotedata
. SaveToFile Server.MapPath (LocalFilename), 2
. Cancel ()
. Close ()
End With
Set ads=nothing
If Err <> 0 Then
SaveFile = False
Err.Clear
Else
SaveFile = True
End If
End Function
%>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.