主题:  求教表单提交问题

sunslee

职务:普通成员
等级:1
金币:0.0
发贴:107
#12007/5/30 15:15:43
有无组件上传问题求教?
一个表单#中使用了#
#
#
#
#

#upload.asp
#

#
#
#


#upfile.asp
#<%
#dim upload,f_folder,file,formPath,iCount,filename,fileExt,filesizemin,filesizemax

#iCount=0
#filesizemin=1*1024
#filesizemax=100*1024*1024
#set upload=new upload_awctv '建立上传对象

#'********************************列出所有上传文件#***************************************************
#For each formName in upload.objFile
#set file=upload.file(formName)
#If file.filesize>0 then

#'********************************检测文件大小#***************************************************
# If file.filesize# response.write "你上传的文件太小了 [ 重新上传 ]
#"
# ElseIf file.filesize>filesizemax then
# response.write "文件大小超过了 "&filesizemax&"字节 限制 [ 重新上传 ]
#"
# End If
    

# '********************************检测文件类型#****************************************************
# fileExt=ucase(right(file.filename,4))
# uploadsuc=false
# Forum_upload="JPG|RM|RA|RMVB|MOV"
# Forumupload=split(Forum_upload,"|")
# for i=0 to ubound(Forumupload)
# if fileEXT="."&trim(Forumupload(i)) then
# uploadsuc=true
# exit for
# else
# uploadsuc=false
# end if
# next
# if uploadsuc=false then
# response.write "文件格式不正确 [ 重新上传 ]"
# response.end
# end if

# '********************************保存上传文件至文件夹#*****************************************
# randomize
# f_ftn="/rm"
#    ranNum=int(90000*rnd)+10000
# filename=f_ftn&"/"&day(now)&"_"&file.filename
# if file.filesize>filesizemin and file.filesize# file.SaveAs Server.mappath(filename) '保存文件
# if f_type="JPG" or f_type="GIF" or f_type="PNG" then
# #response.write ""
# end if
# iCount=iCount+1
# end if
#set file=nothing
#end if
#next
#set upload=nothing '删除此对象
#response.write (filename&"上传成功
#"&iCount&" 个文件上传成功! ")
#%>

编辑历史:[此帖最近一次被 sunslee 编辑过(编辑时间:2007-05-30 15:21:11)]