我用的是动易cms siteweaver建站,在文章里上传图片和附件超过200k的时候就会提示错误'ASP 0104 : 8000400
upload.aspline56出错服务器那边网管说可以上传4MB以下的副件,到底是服务器的问题还是代码的问题啊?代码我没有修改过,说一下,在频道中的上传限制我已经全部改...
upload.asp line56出错服务器那边网管说可以上传4MB以下的副件,到底是服务器的问题还是代码的问题啊?代码我没有修改过,说一下,在频道中的上传限制我已经全部改成了10MB了
upload代码前60行如下:
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2009 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Const MaxTotalSize = 104857600 '上传数据限制,最大上传100M
Const NoAllowExt = "asa|asax|ascs|ashx|asmx|asp|aspx|axd|cdx|cer|config|cs|csproj|idc|licx|rem|resources|resx|shtm|shtml|soap|stm|vb|vbproj|vsdisco|webinfo" '不允许上传类型(黑名单)
Const NeedCheckFileMimeExt = "gif|jpg|jpeg|jpe|bmp|png|swf|mid|mp3|wmv|asf|avi|mpg|ram|rm|ra|rar|exe|doc|zip"
Dim uEnableUpload, uMaxFileSize, AdminLogined
Dim IsUploadAnonymous, Anonymous
Sub Execute()
If ObjInstalled_FSO = False Then
Response.Write "您的服务器不支持FSO,或者FSO已经改名,所以不能上传!"
Exit Sub
End If
If CheckLogin() = False and ShowAnonymous = False Then
Response.Write "请先登录!"
Exit Sub
End If
Dim Forms, Files
Dim oUpFilestream '上传的数据流
'********************************************
'以下代码是对提交的数据进行分析
'********************************************
Dim RequestBinDate, sSpace, bCrLf, sInfo, iInfoStart, iInfoEnd, tStream, iStart
Dim sFormValue, sFileName
Dim iFindStart, iFindEnd
Dim iFormstart, iFormEnd, sFormName
Dim FileInfo(6)
'代码开始
If Request.TotalBytes < 1 Then '如果没有数据上传
FoundErr = True
ErrMsg = "没有数据上传"
Exit Sub
End If
If Request.TotalBytes > MaxTotalSize Then '如果上传的数据超出限制大小
FoundErr = True
ErrMsg = "上传的数据超出限制大小"
Exit Sub
End If
Set Forms = Server.CreateObject("Scripting.Dictionary")
Forms.CompareMode = 1
Set Files = Server.CreateObject("Scripting.Dictionary")
Files.CompareMode = 1
Set tStream = Server.CreateObject("ADODB.Stream")
Set oUpFilestream = Server.CreateObject("ADODB.Stream")
oUpFilestream.Type = 1
oUpFilestream.Mode = 3
oUpFilestream.Open
oUpFilestream.Write Request.BinaryRead(Request.TotalBytes)
oUpFilestream.Position = 0
RequestBinDate = oUpFilestream.Read
iFormEnd = oUpFilestream.size
bCrLf = ChrB(13) & ChrB(10)
'取得每个项目之间的分隔符
sSpace = LeftB(RequestBinDate, InStrB(1, RequestBinDate, bCrLf) - 1)
iStart = LenB(sSpace)
iFormstart = iStart + 2
'分解项目 展开
upload代码前60行如下:
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005-2009 佛山市动易网络科技有限公司 版权所有
'**************************************************************
Const MaxTotalSize = 104857600 '上传数据限制,最大上传100M
Const NoAllowExt = "asa|asax|ascs|ashx|asmx|asp|aspx|axd|cdx|cer|config|cs|csproj|idc|licx|rem|resources|resx|shtm|shtml|soap|stm|vb|vbproj|vsdisco|webinfo" '不允许上传类型(黑名单)
Const NeedCheckFileMimeExt = "gif|jpg|jpeg|jpe|bmp|png|swf|mid|mp3|wmv|asf|avi|mpg|ram|rm|ra|rar|exe|doc|zip"
Dim uEnableUpload, uMaxFileSize, AdminLogined
Dim IsUploadAnonymous, Anonymous
Sub Execute()
If ObjInstalled_FSO = False Then
Response.Write "您的服务器不支持FSO,或者FSO已经改名,所以不能上传!"
Exit Sub
End If
If CheckLogin() = False and ShowAnonymous = False Then
Response.Write "请先登录!"
Exit Sub
End If
Dim Forms, Files
Dim oUpFilestream '上传的数据流
'********************************************
'以下代码是对提交的数据进行分析
'********************************************
Dim RequestBinDate, sSpace, bCrLf, sInfo, iInfoStart, iInfoEnd, tStream, iStart
Dim sFormValue, sFileName
Dim iFindStart, iFindEnd
Dim iFormstart, iFormEnd, sFormName
Dim FileInfo(6)
'代码开始
If Request.TotalBytes < 1 Then '如果没有数据上传
FoundErr = True
ErrMsg = "没有数据上传"
Exit Sub
End If
If Request.TotalBytes > MaxTotalSize Then '如果上传的数据超出限制大小
FoundErr = True
ErrMsg = "上传的数据超出限制大小"
Exit Sub
End If
Set Forms = Server.CreateObject("Scripting.Dictionary")
Forms.CompareMode = 1
Set Files = Server.CreateObject("Scripting.Dictionary")
Files.CompareMode = 1
Set tStream = Server.CreateObject("ADODB.Stream")
Set oUpFilestream = Server.CreateObject("ADODB.Stream")
oUpFilestream.Type = 1
oUpFilestream.Mode = 3
oUpFilestream.Open
oUpFilestream.Write Request.BinaryRead(Request.TotalBytes)
oUpFilestream.Position = 0
RequestBinDate = oUpFilestream.Read
iFormEnd = oUpFilestream.size
bCrLf = ChrB(13) & ChrB(10)
'取得每个项目之间的分隔符
sSpace = LeftB(RequestBinDate, InStrB(1, RequestBinDate, bCrLf) - 1)
iStart = LenB(sSpace)
iFormstart = iStart + 2
'分解项目 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询