aspupload 3.0 下载与使用集锦(2)



1 file(s) uploaded to c:\upload

恭喜你,成功了!

接下来我们讲讲aspupload的一些属性,并将几个有代表性的例子,其他的大家自己看看附带的例子!

File.Size                                单位:bytes
File.Path                                路径
File.FileName                          文件名字
File.MD5Hash
补充:按例子的解释是check whether this file already exists using MD5 hash  ,意思是检查文件是否存在,是个可选项.

文字描述与文件的同时上传并显示,例子Form2.asp(自带)和UploadScript2.asp:

UploadScript2.asp代码如下:

<HTML>
<BODY>
<%
Set Upload = Server.CreateObject("Persits.Upload")
Upload.Save "c:\upload"
%>
Files:<BR>
<%
For Each File in Upload.Files
Response.Write File.Name & "= " & File.Path & " (" & File.Size &" bytes)<BR>"
Next
%>
<P>
Other items:<BR>
<%
For Each Item in Upload.Form
Response.Write Item.Name & "= " & Item.Value & "<BR>"
Next

%>
</BODY>
</HTML>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2667.html