Recommended: How to configure IIS to run both ASP and PHP After completing the Decode of BaiDuMp3, Base64 plus some Unicode changes, I found that the Base64 algorithms in the JS version and ASP version are not ideal for Chinese support, so I used Php, and the server is IIS6.0, so I can make it run Php. 1. Prepare the 3 files php.ini, php5ts.dll, and php5isapi.dll. Among them, php5 is the php version you have.
| The following is the quoted content: <% FunctIon DownloadFIle(StrFIle) StrFIlename=StrFIle Response.Buffer=True Response.Clear Set S=Server.CreateObJect(ADODB.Stream) S.Open S.Type=1 on Error Resume Next Set Fso=Server.CreateObJect(ScrIptIng.FIleSystemObJect) If Not Fso.FIleExists(StrFIleName) Then From_Url=Cstr(Request.ServerVarIables(HTTP_REFERER)) Serv_Url=Cstr(Request.ServerVarIables(SERVER_NAME)) If MId(From_Url,8,len(Serv_Url)) <> Serv_Url Then Response.WrIte The file does not exist or has been deleted. Response.End End If Response.RedIrect Request.ServerVarIables(HTTP_REFERER) Response.End End If FileExt=MId(StrFIlename,InStrRev(StrFIleName, .)+1) Select Case UCase(FIleExt) Case ASP, ASA, ASPX, ASAX, MDB, PHP, JSP, SHTM, HTML, HTM, TV, DATA From_Url=Cstr(Request.ServerVarIables(HTTP_REFERER)) Serv_Url=Cstr(Request.ServerVarIables(SERVER_NAME)) If MId(From_Url,8,len(Serv_Url)) <> Serv_Url Then Response.WrIte The file does not exist or has been deleted. Response.End End If Response.RedIrect Request.ServerVarIables(HTTP_REFERER) Response.End End Select Set F=Fso.GetFIle(StrFIlename) IntFIlelength=F.SIze s.LoadFromFIle(StrFIlename) If Err Then From_Url=Cstr(Request.ServerVarIables(HTTP_REFERER)) Serv_Url=Cstr(Request.ServerVarIables(SERVER_NAME)) If MId(From_Url,8,len(Serv_Url)) <> Serv_Url Then Response.WrIte The file data is incomplete or may be corrupted. Response.End End If Response.RedIrect Request.ServerVarIables(HTTP_REFERER) Response.End End If Set Upload=Server.CreateObJect(PersIts.Upload) If Upload Is Nothing Then Response.AddHeader Content-DIsposItIon,attachment; FIlename=&F.Name Response.AddHeader Content-Length,IntFilelength Response.CharSet=UTF-8 Response.ContentType=application/x-download Response.BinaryWrite S.Read Response.Flush S.Close Set s=NothIng Else Upload.SendBinary StrFIlename,True,application/x-download,False End If End FunctIon %> |
Share: How to add online submission function in sdcms sdcms online submission program reply http://bbs.sdcms.cn/dispbbs.asp?boardid=2