|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP一般认为只能运行在IIS上,正如前面所提到的,这并不是十分正确,事实上,ASP也能运行在Apache上。ApacheASP可在任意Apache服务器上运行有限的ASP功能,所需做的,只需打开mod_perl。控件|上传|下载|下载控件这是控件的源程序:
工程名:MY
控件名:TESTFTP
DimFileNameAsString
DimconnectAsBoolean
PrivateSubCmdCd_Click()
CallLink
Inet1.Execute,"cdc2000"
connect=True
EndSub
PrivateSubCmdList_Click()
Ifconnect=TrueThen
Inet1.Execute,"LS"
Else
Label1.Caption="pleaseclickconnectfirst!"
EndIf
EndSub
PrivateSubCombo1_Click()
FileName=Combo1.Textfilenameofdownloadfile
EndSub
PrivateSubCmdDown_Click()
DimFileLastAsStringlastnameoffile
DimSaveFileNameAsStringfilenameinftpserver
CallLink
IfFileName=""Then
Label1.Caption="pleaseselectfiletodownload!"
Else
FileLast=""
Fori=1ToLen(FileName)
IfMid(FileName,i,1)"."Then
FileLast=FileLast+Mid(FileName,i,1)
Else
FileLast=""
EndIf
Next
REDO:CommonDialog1.ShowSave
IfInStr(1,CommonDialog1.FileName,"",1)>0Then
Label1.Caption="Thefilecantincludespace!"
MyVar=MsgBox("Redoit?",65,"Downloadfile")
IfMyVar="1"Then
GoToREDO:
Else
GoToNODO:
EndIf
EndIf
SaveFileName=CommonDialog1.FileName&"."&FileLast
Inet1.Execute,"GET"&FileName&""&SaveFileName
EndIf
NODO:
EndSub
PrivateSubCmdUpload_Click()
DimSaveFileNameAsString
DimUpFileNameAsStringfilenameofuploadfileincludepath
DimMyVar
SaveFileName=""
CallLink
REDO:CommonDialog1.ShowOpen
IfInStr(1,CommonDialog1.FileName,"",1)>0Then
MsgBox"Thefilecantincludespace!"
MyVar=MsgBox("Redoit?",65,"Uploadfile")
IfMyVar="1"Then
GoToREDO:
Else
GoToNODO:
EndIf
EndIf
UpFileName=CommonDialog1.FileName
MsgBoxUpFileName
Fori=1ToLen(UpFileName)
IfMid(UpFileName,i,1)""Then
SaveFileName=SaveFileName+Mid(UpFileName,i,1)
Else
SaveFileName=""
EndIf
Next
IfSaveFileName=""Then
Label1.Caption="nofile!"
Else
Inet1.Execute,"PUT"&UpFileName&""&SaveFileName
EndIf
NODO:
EndSub
PrivateSubInet1_StateChanged(ByValStateAsInteger)
SelectCaseState
Case1
Label1.Caption="正在查询所指定的主机的IP地点"
Case2
Label1.Caption="乐成地找到所指定的主机的IP地点。"
</p>ASP由于使用了COM组件所以它会变的十分强大,但是这样的强大由于WindowsNT系统最初的设计问题而会引发大量的安全问题。只要在这样的组件或是操作中一不注意,哪么外部攻击就可以取得相当高的权限而导致网站瘫痪或者数据丢失; |
|