我使用的化境上传怎么只能上传200K一下的文件

来源:百度知道 编辑:UC知道 时间:2024/05/09 12:41:06
dim upload,file,formPath,upsize,fileExt,ranNum,datetime,filename,title,content,UpName,adduser
%>
<!--#INCLUDE FILE="inc/upload.inc" -->
<%
set upload=new upload_5xsoft ''建立上传对象
formPath="upfile/"

if upload.form("title")="" then
errmsg=errmsg+"<br>"+"<li>请输入名称"
founderr=true
else
title=trim(upload.form("title"))
end if

if upload.form("content")="" then
errmsg=errmsg+"<br>"+"<li>请输入说明"
founderr=true
else
content=trim(upload.form("content"))
end if

set file=upload.file("UpFile")
if file.FileSize=0 then ''如果 FileSize > 0 说明有文件数据
errmsg=errmsg+"<br>"+"<li>请选择要上传的文件"
founderr=true
end if

if founderr then
call error()
r

首先停止 IIS 服务,之后打开 C:\Windows\System32\Inetsrv 中的 metabase.XML, 并修改 AspMaxRequestEntityAllowed 为你需要的值(例如 1073741824, 1GB)。
启动IIS服务。