NEWSZW_HZH_BEGIN-->
<%@ LANGUAGE="VBscript" %>
<html>
<head>
<title> 撼雪喷云之限传文件 </title>
</head>
<body>
<% Set upl = Server.CreateObject("SoftArtisans.FileUp") %>
<% upl.MaxBytes = 1000
' 限制最大尺寸 1000 字节 .
%>
特别提醒 : 每一个上传文件最大不超过 .
<%=upl.MaxBytes%> 字节 .<br>
<% upl.SaveAs "C:\intels\temp\upload.out" %>
总计写入字节数 : <%=upl.TotalBytes%><br>
服务器文件名 : <%=upl.ServerName%><br>
你发送的总字节数 : <%=Request.TotalBytes%>
</body></html>
这样,所有第 1000 个字节以后的内容都会被丢弃,限制了文件大小,拉开了不同会员等级之间的差距。
[1]
NEWSZW_HZH_END-->查看更多关于如何限制上传文件的大小?_编程10000问_的详细内容...