问:空间里USER目录里有个上传组件文件名“upload_5xsoft.inc”,该文件上传到空间后内容立即被清空。造成整站程序相应功能无法运行。请告知原因。谢谢!—–upload_5xsoft.inc 文件内容—<%dim Data_5xsoftPrivate Sub Class_Initialize dim ,sStart,vbCrlf,sInfo,iInfoStart,iInfoEnd,tStream,iStart,theFile dim ,sFilePath,sFileType,sFormValue,sFileName dim ,iFindEnd dim ,iFormEnd,sFormName Version=\”化境HTTP上传程序 2.0\” set objForm=server=demo(\”Scripting.Dictionary\”) set objFile=server=demo(\”Scripting.Dictionary\”) if Request.TotalBytes<1 then Exit Sub set = server=demo(\”adodb.stream\”) set Data_5xsoft = server=demo(\”adodb.stream\”) Data_5xsoft.Type = 1 Data_5xsoft.Mode =3 Data_5xsoft.Open Data_5xsoft.Write Request.BinaryRead(Request.TotalBytes) Data_5xsoft.Position=0 =Data_5xsoft.Read = 1 = LenB(RequestData) = chrB(13) & chrB(10) = MidB(RequestData,1, InStrB(iFormStart,RequestData,vbCrlf)-1) = LenB (sStart) iFormStart=iFormStart iStart 1 while (iFormStart 10) < = InStrB(iFormStart,RequestData,vbCrlf & vbCrlf) 3 tStream.Type = 1 tStream.Mode =3 tStream.Open Data_5xsoft.Position = Data_5xsoft.CopyTo ,tart tStream.Position = 0 tStream.Type = 2 tStream.Charset =\”\” sInfo = tStream.ReadText tStream.Close \’取得表单项目名称 = InStrB(iInfoEnd,RequestData,sStart) = InStr(22,sInfo,\”name=\”\”\”,1) 6 = InStr(iFindStart,sInfo,\”\”\”\”,1) = lcase(Mid (sinfo,iFindStart,tart)) \’如果是文件 if InStr (45,sInfo,\”filename=\”\”\”,1) > 0 then set theFile=new \’取得文件名 = InStr(iFindEnd,sInfo,\”filename=\”\”\”,1) 10 = InStr(iFindStart,sInfo,\”\”\”\”,1) = Mid (sinfo,iFindStart,tart) theFile.FileName=getFileName(sFileName) theFile.FilePath=getFilePath(sFileName) \’取得文件类型 = InStr(iFindEnd,sInfo,\”Content-Type: \”,1) 14 = InStr(iFindStart,sInfo,vbCr) theFile.FileType =Mid (sinfo,iFindStart,tart) theFile.FileStart =iInfoEnd theFile.FileSize = -iInfoEnd -3 theFile.FormName=sFormName if not objFile.Exists(sFormName) then objFile.add ,theFile end if else \’如果是表单项目 tStream.Type =1 tStream.Mode =3 tStream.Open Data_5xsoft.Position = Data_5xsoft.CopyTo ,iFnd-3 tStream.Position = 0 tStream.Type = 2 tStream.Charset =\”\” = tStream.ReadText tStream.Close if objForm.Exists(sFormName) then objForm(sFormName)=objForm(sFormName)&\”, \”& else objForm.Add ,sFormValue end if end if iFormStart=iFormStart iStart 1 wend RequestData=\”\” set =nothingEnd SubPrivate Sub Class_Terminate if Request.TotalBytes>0 then objForm.RemoveAll objFile.RemoveAll set objForm=nothing set objFile=nothing Data_5xsoft.Close set Data_5xsoft =nothing end ifEnd Sub function GetFilePath(FullPath) If <> \”\” Then = left(FullPath,InStrRev(FullPath, \”\\\”)) Else = \”\” End If End function GetFileName(FullPath) If <> \”\” Then = mid(FullPath,InStrRev(FullPath, \”\\\”) 1) Else = \”\” End If End ClassClass dim ,FileName,FilePath,FileSize,FileType,FileStart Sub Class_Initialize = \”\” = \”\” = 0 FileStart= 0 = \”\” = \”\” End Sub function SaveAs(FullPath) dim dr,ErrorChar,i SaveAs=true if trim(fullpath)=\”\” or FileStart=0 or FileName=\”\” or right(fullpath,1)=\”/\” then exit set dr=CreateObject(\”Adodb.Stream\”) dr.Mode=3 dr.Type=1 dr.Open Data_5xsoft.position=FileStart Data_5xsoft.copyto dr,FileSize dr.SaveToFile ,2 dr.Close set dr=nothing SaveAs=false end End Class%>结束,空间里目录里有个上传组件文件名
答:您好,非常感谢您对我司的支持,谢谢!