'文件上传=>该方法返回文件保存的相对路径
参数说明
filevalue 表单文件域的值
path 你想保存到指定的文件夹
'=====================================================================================
Function fileup(filevalue,path)
dim strFileName,filename,fileExt
strFileName = filevalue '得到前一页提交来的文件地址值
ranNum=int(90000*rnd)+10000
fileExt = Mid(strFileName,Instr(strFileName,".")+1,Len(strFileName)-Instr(strFileName,"."))'获取扩展名
filename=path&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1 ' adTypeBinary
objStream.Open
objStream.LoadFromFile strFileName
objStream.SaveToFile Server.MapPath(filename),2
objStream.Close
fileup=filename
end Function