file.FileSize file.imagewidth file.imageheight问题
<%session.timeout=10%><!--#include FILE="upload.inc"-->
<%
on error resume next
dim upload,file,formName,formPath,iCount
set upload=new upload_F
function MakedownName()
dim fname
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
fname = int(fname) + int((10-1+1)*Rnd + 1)
MakedownName=fname
end function
formPath="pic/"
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
newname=MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
file.SaveAs Server.mappath(formPath&newname) ''保存文件
iCount=iCount+1
next
date=year(now())&"-"&right(("0"&month(now())),2)&"-"&right(("0"&day(now())),2)&" "&right(("0"&Hour(now())),2)&":"&right(("0"&Minute(now())),2)&":"&right(("0"&Second(now())),2)
%>
图片的大小:<%=cint(file.FileSize/1024)%>K</td>
nbsp;图片原始宽度:<%=file.imagewidth%></td>
nbsp;图片原始高度:<%=file.imageheight%></td>
红色的一段无法显示
错误提示缺少对象