找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 112|回复: 5

已经解诀(可以看看这个解诀办法,真是让人想不到)

[复制链接]
发表于 2010-1-11 03:21:01 | 显示全部楼层 |阅读模式 IP:江苏扬州
<!--#include file="upload.inc"-->

<html>
<head>
<title>文件上传</title>
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    background-color: #EEFFEE;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>

<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

randomize
ranNum=int(90000*rnd)+10000
FileName=formPath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&fileExt

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  ''删除此对象

Htmend iCount&" 个文件上传结束!"

sub HtmEnd(Msg)
set upload=nothing

response.write "上传成功"
response.end
end sub

%>


看看为什么上传在500K的时候文件可以
上传超过500K就不可以了
我设置的是6M啊(
发表于 2010-1-11 03:21:05 | 显示全部楼层 IP:江苏扬州
已经解诀.因为2003的系统只能上传200K以下的文件
所以不能上传,改了之后就可以了
呵呵
跟你们说一下怎么改得吧
高兴的可以看一下.
1.停止IIS Admin Service服务。

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

保存为requestchange.vbs(假设我们保存在D盘根目录下)

2.打开命令窗口,输入cscript  D:\requestchange.vbs, 回车即可。

注:上述方法经过本人测试有效,但是存在一个问题,上传25M的文件没有问题,上传40M就出问题了。所以具体在使用时还要自己测试一下。如果各位高人有更好的办法,还请不吝赐教!谢了! 本帖最近评分记录
永夜的极光 +8 我很赞同 2008-5-9 11:26   2008-5-9 11:19:24 madpbpl

等 级:贵宾
威 望:10
帖 子:2801
专家分:0
注 册:2007-4-5
第 3 楼   得分:0  
方法不错
但是个人认为过大的文件不适合用无组件上传,直接ftp就可以了,上传的太慢,没那个必要。
回复

使用道具 举报

发表于 2010-1-11 03:21:09 | 显示全部楼层 IP:江苏扬州
你没有看过,看过之后就知道了,算了,我还要去改一个呢?不说了,做程序去了
回复

使用道具 举报

发表于 2010-2-6 18:05:04 | 显示全部楼层 IP:上海大学
还没崇拜过谁呢,满足一下愿望吧,谢谢!
回复

使用道具 举报

发表于 2010-2-20 18:05:12 | 显示全部楼层 IP:香港
大Shi的话真如“大音希声扫阴翳”,犹如“拨开云雾见青天”,使我等网民看到了希望,看到了未来!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 15:21 , Processed in 0.335366 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表