注册 登录
编程论坛 ASP技术论坛

Microsoft VBScript 运行时错误 错误 '800a01a8'

myosotis 发布于 2009-09-12 14:34, 1046 次点击
Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: '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
2 回复
#2
myosotis2009-09-12 14:56
如何解决防SQL注入与图片无组件上传的冲突??
#3
aspic2009-09-13 08:40
你这个是与防SQL注入冲突?
1