|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
帮助用户快速实现各种应用服务,ASP商有整合各方面资源的能力,可在短期内为用户提供所需的解决方案。例如,典型的ERP安装,如果要在客户端安装的话需要半年到二年的时间,但是美国的一些ASP商如USI和CORIO能在90—120天内提供ERP应用方案。ASP埋没下载地点及防盗代码以下为援用的内容:
<%FunctIonDownloadFIle(StrFIle)
StrFIlename=StrFIle
Response.Buffer=True
Response.Clear
SetS=Server.CreateObJect("ADODB.Stream")
S.Open
S.Type=1
onErrorResumeNext
SetFso=Server.CreateObJect("ScrIptIng.FIleSystemObJect")
IfNotFso.FIleExists(StrFIleName)Then
From_Url=Cstr(Request.ServerVarIables("HTTP_REFERER"))
Serv_Url=Cstr(Request.ServerVarIables("SERVER_NAME"))
IfMId(From_Url,8,len(Serv_Url))Serv_UrlThen
Response.WrIte"该文件不存在大概已删除."
Response.End
EndIf
Response.RedIrectRequest.ServerVarIables("HTTP_REFERER")
Response.End
EndIf
FileExt=MId(StrFIlename,InStrRev(StrFIleName,".")+1)
SelectCaseUCase(FIleExt)
Case"ASP","ASA","ASPX","ASAX","MDB","PHP","JSP","SHTML","HTML","HTM","TV","DATA"
From_Url=Cstr(Request.ServerVarIables("HTTP_REFERER"))
Serv_Url=Cstr(Request.ServerVarIables("SERVER_NAME"))
IfMId(From_Url,8,len(Serv_Url))Serv_UrlThen
Response.WrIte"该文件不存在大概已删除."
Response.End
EndIf
Response.RedIrectRequest.ServerVarIables("HTTP_REFERER")
Response.End
EndSelect
SetF=Fso.GetFIle(StrFIlename)
IntFIlelength=F.SIze
s.LoadFromFIle(StrFIlename)
IfErrThen
From_Url=Cstr(Request.ServerVarIables("HTTP_REFERER"))
Serv_Url=Cstr(Request.ServerVarIables("SERVER_NAME"))
IfMId(From_Url,8,len(Serv_Url))Serv_UrlThen
Response.WrIte"该文件数据不完全也许已破坏."
Response.End
EndIf
Response.RedIrectRequest.ServerVarIables("HTTP_REFERER")
Response.End
EndIf
SetUpload=Server.CreateObJect("PersIts.Upload")
IfUploadIsNothingThen
Response.AddHeader"Content-DIsposItIon","attachment;FIlename="&F.Name
Response.AddHeader"Content-Length",IntFilelength
Response.CharSet="UTF-8"
Response.ContentType="application/x-download"
Response.BinaryWriteS.Read
Response.Flush
S.Close
Sets=NothIng
Else
Upload.SendBinaryStrFIlename,True,"application/x-download",False
EndIf
EndFunctIon
%>
挪用
<%CallDownloadFIle("下载地点")%>
Windows本身的所有问题都会一成不变的也累加到了它的身上。安全性、稳定性、跨平台性都会因为与NT的捆绑而显现出来; |
|