<script>
parent.document.forms[0].Submit.disabled=false;
</script>
<%
dim upload,file,formName,formPath,iCount,filename,fileExt
set upload=new upload_5xSoft ''建立上传对象
formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
response.write "<body>"
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.filesize<6144 then
response.write "请选择你要上传的音乐 [ <a href=# onclick=history.go(-1)>重新上传</a> ]"
response.end
end if
if file.filesize>6144*1000 then
response.write "音乐大小超过了限制6M [ <a href=# onclick=history.go(-1)>重新上传</a> ]"
response.end
end if
fileExt=lcase(right(file.filename,4))
uploadsuc=false
Forum_upload="mp3,wav,wma"
Forumupload=split(Forum_upload,",")
for i=0 to ubound(Forumupload)
if fileEXT="."&trim(Forumupload(i)) then
uploadsuc=true
exit for
else
uploadsuc=false
end if
next
if uploadsuc=false then
response.write "音乐格式不正确 [ <a href=# onclick=history.go(-1)>重新上传</a> ]"
response.end
end if
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath(FileName) ''保存文件
for i=0 to ubound(Forumupload)
if fileEXT="."&trim(Forumupload(i)) then
response.write "<script>parent.form1.musicnm.value+='"&FileName&"'</script>"
exit for
end if
next
iCount=iCount+1
end if
set file=nothing
next
set upload=nothing ''删除此对象
2.按照如下的路径找到文件:系统盘(C:)>> Windows >> System32 >> inetsrv >> MetaBase.xml, 在该文件中搜索AspMaxRequestEntityAllowed,设置为你想要的数字(默认204800即200K)。
3.重新启动IIS Admin Service服务。
方法二:
1.复制以下代码到记事本中:
'use VBS
set obj1=GetObject("winmgmts:/root/MicrosoftIISv2")
set obj2=obj1.get("IIsWebVirtualDirSetting='W3SVC/1/ROOT'")
'Output default value
WScript.Echo "AspMaxRequestEntityAllowed Default Value: " & obj2.AspMaxRequestEntityAllowed
'Reset the value
obj2.AspMaxRequestEntityAllowed=1000000000 ' set to 1mbyte, u can set to other what you want :)
' Save data
obj2.Put_()
'Output new value
WScript.Echo "AspMaxRequestEntityAllowed New Value: " & obj2.AspMaxRequestEntityAllowed