急!图片上传中保存函数错误。请高手帮忙!

来源:百度知道 编辑:UC知道 时间:2024/07/08 11:33:57
Public function SaveAs(FullPath)
dim dr,ErrorChar,i
SaveAs=true
if trim(fullpath)="" or FileStart=0 or FileName="" or right(fullpath,1)="/" then exit function
set dr=CreateObject("Adodb.Stream")
dr.Mode=3
dr.Type=1
dr.Open
Data_5xsoft.position=FileStart
Data_5xsoft.copyto dr,FileSize
dr.SaveToFile FullPath,2
dr.Close
set dr=nothing
SaveAs=false
end function
执行时这
dr.SaveToFile FullPath,2
一行报错


dr.SaveToFile FullPath,2
这行的前面把FullPath输出看一下,应该是权限问题
具体是:
...
response.write FullPath:response.end
dr.SaveToFile FullPath,2
...
如果路径无误,请检查该路径是否实际存在、是否有写入权限(FSO)