upload.htm
<html>
<body>
<h3>文件上传演示</h3>
<form method="post" enctype="multipart/form-data" action="upload.asp">
<input type="file" size="40" name="file1"><br>
<input type="file" size="40" name="file2"><br>
<input type="file" size="40" name="file3"><br>
<input type=submit value="上传">
</form>
</body>
</html>
<html>
<body>
<h3>文件上传演示</h3>
<form method="post" enctype="multipart/form-data" action="upload.asp">
<input type="file" size="40" name="file1"><br>
<input type="file" size="40" name="file2"><br>
<input type="file" size="40" name="file3"><br>
<input type=submit value="上传">
</form>
</body>
</html>
upload.asp
<html>
<body>
<%
set upload = server.createobject("persits.upload")
count = upload.save(server.mappath("/"))
response.write(count & " 文件已上传到 " & server.mappath("/"))
%>
</body>
</html>
更详细的应用案例,请查看ASPUpload组件自带的演示样例。点击这里下载ASPUpload组件,安装后有详细的说明及演示样例。
本文提供了一个使用ASP进行文件上传的简单实例,展示了如何通过HTML表单接收文件,并利用ASPUpload组件处理上传请求,将文件保存到服务器指定目录。

931

被折叠的 条评论
为什么被折叠?



