![]() |
#2
myosotis2009-09-12 14:56
|
缺少对象: 'upfile.File(...)'
/THB_SUPER/news.asp,行69
代码如下:

dim upfile,formPath,ServerPath,FSPath,formName,FileName,oFile,upfilecount
dim littlepic,largePic,largepath,littlepath,oFile1
upfilecount=0
set upfile=new upfile_class ''建立上传对象
upfile.NoAllowExt="asp;exe;htm;html;aspx;cs;vb;js;" '设置上传类型的黑名单
upfile.GetData (51200000) '取得上传数据,限制最大上传100M
if upfile.isErr then '如果出错
select case upfile.isErr
case 1
Response.Write "没有修改图片!"
case 2
Response.Write "你上传的文件超出我们的限制,最大50M"
end select
else
FSPath=GetFilePath(Server.mappath("../upload/df.css"),"\")'取得当前文件在服务器路径
ServerPath=GetFilePath(Request.ServerVariables("HTTP_REFERER"),"/")'取得在网站上的位置
set oFile1=upfile.file("d_picture") '出错行代码
FileName = upfile.GetNewFileName()&"."&oFile1.FileExt
upfile.SaveToFile "d_picture",FSPath&FileName
littlepic = FileName
littlepath = FSPath&FileName
end if
dim littlepic,largePic,largepath,littlepath,oFile1
upfilecount=0
set upfile=new upfile_class ''建立上传对象
upfile.NoAllowExt="asp;exe;htm;html;aspx;cs;vb;js;" '设置上传类型的黑名单
upfile.GetData (51200000) '取得上传数据,限制最大上传100M
if upfile.isErr then '如果出错
select case upfile.isErr
case 1
Response.Write "没有修改图片!"
case 2
Response.Write "你上传的文件超出我们的限制,最大50M"
end select
else
FSPath=GetFilePath(Server.mappath("../upload/df.css"),"\")'取得当前文件在服务器路径
ServerPath=GetFilePath(Request.ServerVariables("HTTP_REFERER"),"/")'取得在网站上的位置
set oFile1=upfile.file("d_picture") '出错行代码
FileName = upfile.GetNewFileName()&"."&oFile1.FileExt
upfile.SaveToFile "d_picture",FSPath&FileName
littlepic = FileName
littlepath = FSPath&FileName
end if