马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP由于使用了COM组件所以它会变的十分强大,但是这样的强大由于WindowsNT系统最初的设计问题而会引发大量的安全问题。只要在这样的组件或是操作中一不注意,哪么外部攻击就可以取得相当高的权限而导致网站瘫痪或者数据丢失;
<%
DimMyFileFolder
SetMyFileFolder=NewFileFolderCls
Response.WriteMyFileFolder.MoveAFile("f:1234561.exe","f:1234562.txt")
Response.WriteMyFileFolder.MoveAFolder("f:456","f:ditg456")
Response.WriteMyFileFolder.ShowFileSystemType("i:")
Response.WriteMyFileFolder.CopyAFile("f:1234562.txt","f:1234563.txt")
!!!!
Response.WriteMyFileFolder.CopyAFolder("f:123","f:789")
Response.WriteMyFileFolder.ShowFolderList("f:ditg")
Response.WriteMyFileFolder.ShowFileList("f:123123")
Response.WriteMyFileFolder.DeleteAFile("f:1234562.txt")
Response.WriteMyFileFolder.DeleteAFolder("f:456")
Response.WriteMyFileFolder.CreateFolderDemo("f:147")
Response.WriteMyFileFolder.GetFileSize("f:1234563.txt")
Response.WriteMyFileFolder.GetFolderSize("f:123123.txt")
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",1)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",2)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",3)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",4)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",5)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",6)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",7)&"<br>"
Response.WriteMyFileFolder.ShowFileAccessInfo("f:123123.txt",8)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",1)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",2)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",3)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",4)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",5)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",6)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",7)&"<br>"
Response.WriteMyFileFolder.ShowFolderAccessInfo("f:123",8)&"<br>"
Response.WriteMyFileFolder.WriteTxtFile("f:123cexo.txt","",1)&"<br>"
Response.WriteMyFileFolder.WriteTxtFile("f:123cexo.txt","cexowxfdw",1)&"<br>"
Response.WriteMyFileFolder.WriteTxtFile("f:123cexo.txt",Chr(13)&Chr(10)
&"cexowxfdw",2)&"<br>"
Response.WriteMyFileFolder.ReadTxtFile("f:123cexo.txt")&"<br>"
Response.WriteMyFileFolder.DisplayLevelDepth("F:ditgditgumenimages")&"<br>"
ClassFileFolderCls
Publicfso
PrivateSubClass_Initialize()
Setfso=CreateObject("Scripting.FileSystemObject")
EndSub
PrivateSubClass_Terminate()
Setfso=Nothing
EndSub
//==================================文件操纵==================================
取文件巨细
FunctionGetFileSize(FileName)
//功效:取文件巨细
//形参:文件名
//前往值:乐成为文件巨细,失利为-1
//
Dimf
IfReportFileStatus(FileName)=1Then
Setf=fso.Getfile(FileName)
GetFileSize=f.Size
Else
GetFileSize=-1
Endif
EndFunction
文件删除
FunctionDeleteAFile(filespec)
//功效:文件删除
//形参:文件名
//前往值:乐成为1,失利为-1
//
IfReportFileStatus(filespec)=1Then
fso.DeleteFile(filespec)
DeleteAFile=1
Else
DeleteAFile=-1
&nbs</p>ASP是依赖组件的,能访问数据库的组件好多就有好多种,再有就是你微软的工具可是什么都要收钱的啊! |