<%
'检测组件
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err=0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
'基于AspUpLoad的上传类
Class AspUpLoad
Private ImageCover'是否覆盖
Private ImageMaxSize'上传大小
Private ImageExt '文件名
Private ImageFile '保存路径
'是否覆盖
Public Property Let Cover(v)
ImageCover=v
End Property
Public Property Get Cover()
Cover=ImageCover
End Property
'文件大小
Public Property Let MaxSize(v)
ImageMaxSize=v
End Property
Public Property Get MaxSize()
MaxSize=ImageMaxSize
End Property
'文件名
Public Property Let Ext(v)
ImageExt=v
End Property
Public Property Get Ext()
Ext=ImageExt
End Property
'保存路径
Public Property Let Path(v)
ImageFile=v
End Property
Public Property Get Path()
Path=ImageFile
End Property
'初始化数据
Public Sub Class_Initialize
ImageCover=False
ImageMaxSize=10*1024
ImageExt=".jpg|.gif|.bmp"
ImageFile="."
End Sub
Public Sub Open(UpLoad,MyFiles)
Dim ThisExt
Dim Cont
If IsObjInstalled("Persits.Upload") then
Set Upload = Server.CreateObject("Persits.Upload")
'检测组件
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err=0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
'基于AspUpLoad的上传类
Class AspUpLoad
Private ImageCover'是否覆盖
Private ImageMaxSize'上传大小
Private ImageExt '文件名
Private ImageFile '保存路径
'是否覆盖
Public Property Let Cover(v)
ImageCover=v
End Property
Public Property Get Cover()
Cover=ImageCover
End Property
'文件大小
Public Property Let MaxSize(v)
ImageMaxSize=v
End Property
Public Property Get MaxSize()
MaxSize=ImageMaxSize
End Property
'文件名
Public Property Let Ext(v)
ImageExt=v
End Property
Public Property Get Ext()
Ext=ImageExt
End Property
'保存路径
Public Property Let Path(v)
ImageFile=v
End Property
Public Property Get Path()
Path=ImageFile
End Property
'初始化数据
Public Sub Class_Initialize
ImageCover=False
ImageMaxSize=10*1024
ImageExt=".jpg|.gif|.bmp"
ImageFile="."
End Sub
Public Sub Open(UpLoad,MyFiles)
Dim ThisExt
Dim Cont
If IsObjInstalled("Persits.Upload") then
Set Upload = Server.CreateObject("Persits.Upload")
