📄 manual_misc.html
字号:
<TABLE BORDER=1 CELLSPACING=0><BR>
<TH>Name</TH><TH>Size</TH> <TH>Type</TH> <TH>Modified</TH> <TH>Created</TH><TH>Attr</TH><TR><BR>
<% For Each Item in Dir %><P>
<% If Item.IsSubdirectory Then %><BR>
<TD><B><A HREF="DirectoryListing.asp?Dir=<% = Server.URLEncode(Left(Dir.Path, Len(Dir.Path)-3)) & Server.URLEncode(Item.FileName) & "\" %>"><% = Item.FileName %></A></B></TD><BR>
<TD><B>DIR</B></TD><BR>
<% Else %><BR>
<TD><A HREF="Download.asp?Name=<% =Server.URLEncode( Item.FileName )%>&File=<% = Server.URLEncode(Left(Dir.Path, Len(Dir.Path)-3)) %><% =Server.URLEncode( Item.FileName )%>"><% = Item.FileName %></A></TD><BR>
<TD ALIGN=RIGHT><% = Item.Size %></TD><BR>
<% End If %><P>
<TD><% = Item.FileType %></TD><BR>
<TD><% = Item.LastWriteTime %></TD><BR>
<TD><% = Item.CreationTime %></TD><br>
<TD> <BR>
<%<BR>
If Item.CheckAttribute( FILE_ATTR_READONLY) Then<BR>
Response.Write "R"<BR>
End If<BR>
If Item.CheckAttribute( FILE_ATTR_HIDDEN) Then<BR>
Response.Write "H"<BR>
End If<BR>
If Item.CheckAttribute( FILE_ATTR_SYSTEM) Then<BR>
Response.Write "S"<BR>
End If<BR>
If Item.CheckAttribute( FILE_ATTR_ARCHIVE) Then<BR>
Response.Write "A"<BR>
End If<BR>
%><BR>
</TD><TR><BR>
<% Next %><BR>
</TABLE><BR>
</BODY><BR>
</HTML><BR>
</FONT></TD></TR>
</TABLE>
<P>
<B>download.asp</B><BR>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
<TR><TD BGCOLOR="#FFFF00">
<FONT SIZE="1" FACE="Courier New">
<%<BR>
' AspUpload Code samples: download.asp<BR>
' Invoked by DirectoryListing.asp<BR>
' Copyright (c) 2001 Persits Software, Inc<BR>
' http://www.persits.com<P>
' This file must not contain any HTML tags<P>
Set Upload = Server.CreateObject("Persits.Upload")<BR>
Upload.SendBinary Request("File"), True, "application/octet-stream", True<BR>
%><BR>
</FONT></TD></TR>
</TABLE>
<P>
Click the link below to run this code sample:
<P>
<B><A TARGET="_new" HREF="http://localhost/aspupload/09_misc/DirectoryListing.asp">http://localhost/aspupload/09_misc/DirectoryListing.asp</A></B>
<A HREF="javascript:;" OnClick="open('helppopup.html','','width=400,height=400');"><IMG SRC="help.gif" BORDER="0" ALT="Why is this link not working?"></A>
</BLOCKQUOTE>
<B><FONT COLOR="#0000A0">Interactive File Deletion</FONT></B>
<BLOCKQUOTE>
The Directory Listing functionality can be used to provide an interface
for interactive file deletion from the server.
The code sample <B>DeleteFiles.asp</B> lists files in an arbitrary
directory with checkboxes next to each file. A user may check any or
all boxes and click the Delete button. Note that the line <B>Upload.DeleteFile</B>
is commented out for security purposes.
<P>
This code sample also demonstrates sorting by various columns.
<P>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
<TR><TD BGCOLOR="#FFFF00">
<FONT SIZE="1" FACE="Courier New">
<HTML><BR>
<BODY><BR>
<H3>File Deletion</H3><BR>
<%<BR>
Directory = "c:\" ' initial directory<BR>
Set Upload = Server.CreateObject("Persits.Upload.1")<BR>
Set Dir = Upload.Directory( Directory & "*.*", Request("sortby"))<P>
' perform deletions if this is a form submission<BR>
If Request("Delete") <> "" Then<BR>
For Each Item in Request("FileName")<BR>
Response.Write "<B>Deleting File " & Item & "</B><BR>"<BR>
' uncomment next line to enable deletions.<BR>
' Upload.DeleteFile Directory & Item <BR>
Next<BR>
End If<BR>
%><P>
<h3><% = Dir.Path %></h3><P>
<FORM ACTION="DeleteFiles.asp" METHOD="POST"><BR>
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0" STYLE="font-size: 8pt;"><BR>
<TR><TH>&nbsp;</TH><BR>
<TH><A HREF="DeleteFiles.asp?sortby=1">Name</A></TH><BR>
<TH><A HREF="DeleteFiles.asp?sortby=3">Size</A></TH><BR>
<TH><A HREF="DeleteFiles.asp?sortby=2">Type</A></TH><BR>
<TH><A HREF="DeleteFiles.asp?sortby=5">Date</A></TH></TR><BR>
<% For Each File in Dir %><BR>
<% If Not File.IsSubdirectory Then %><BR>
<TR><BR>
<TD><INPUT TYPE="CHECKBOX" VALUE="<% = Server.HTMLEncode(File.FileName)%>" NAME="FileName"></TD><BR>
<TD><% = File.FileName %></TD><BR>
<TD><% = File.Size %></TD><BR>
<TD><% = File.FileType %></TD><BR>
<TD><% = File.LastWriteTime %></TD<BR>>
</TR><BR>
<% End If<BR>
Next<BR>
%><BR>
<TR><BR>
<TD COLSPAN="5"><BR>
<INPUT TYPE="HIDDEN" NAME="sortby" VALUE="<% = Request("sortby") %>"><BR>
<INPUT TYPE="SUBMIT" NAME="Delete" VALUE="Delete selected files"><BR>
</TD><BR>
</TR><BR>
</TABLE><BR>
</FORM><BR>
</BODY><BR>
</HTML><BR>
</FONT></TD></TR>
</TABLE>
<P>
Click the link below to run this code sample:
<P>
<B><A TARGET="_new" HREF="http://localhost/aspupload/09_misc/DeleteFiles.asp">http://localhost/aspupload/09_misc/DeleteFiles.asp</A></B>
<A HREF="javascript:;" OnClick="open('helppopup.html','','width=400,height=400');"><IMG SRC="help.gif" BORDER="0" ALT="Why is this link not working?"></A>
</BLOCKQUOTE>
<B><FONT COLOR="#0000A0">ActiveX Registration</FONT></B>
<BLOCKQUOTE>
UploadManager provides the method <B>RegisterServer</B> that mimics
the behavior of the <B>REGSVR32</B> utility. You can use it to automatically
register ActiveX DLLs being uploaded:
<P>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
<TR><TD BGCOLOR="#FFFF00">
<FONT SIZE="1" FACE="Courier New">
<%<BR>
Set Upload = Server.CreateObject("Persits.Upload")<BR>
Upload.Save "c:\Upload" <BR>
For Each File in Upload.Files <BR>
Upload.RegisterServer File.Path<BR>
Next<BR>
%><BR>
</FONT></TD></TR>
</TABLE>
<P>
If the optional second parameter is set to False, the method will
unregister the library:
<P>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
<TR><TD BGCOLOR="#FFFF00">
<FONT SIZE="1" FACE="Courier New">
...<BR>
Upload.RegisterServer File.Path, False<BR>
...
</FONT></TD></TR>
</TABLE>
</BLOCKQUOTE>
<B><FONT COLOR="#0000A0">Encryption Support</FONT></B>
<BLOCKQUOTE>
AspUpload can be used in conjunction with another Persits Software component,
<A TARGET="_new" HREF="http://www.aspencrypt.com"><B>AspEncrypt</B></A> to encrypt
files as they are being uploaded,
and decrypt them as they are being downloaded.
<P>
File encryption is beyond the scope of this manual.
For more information on AspEncrypt-aided secure file uploading and downloading,
see the chapter <A HREF="http://www.aspencrypt.com/task_upload.html">Implement Secure File Uploading and Downloading </A>
of the AspEncrypt manual.
</BLOCKQUOTE>
<B><FONT COLOR="#0000A0">Introducing XUpload and JUpload</FONT></B>
<BLOCKQUOTE>
In traditional file uploading, files are selected
with an HTML form via <INPUT TYPE="FILE">
controls. This method has many limitations:
<UL>
<LI>Only one file can be selected at a time;
<LI>There is no way to select an entire folder;
<LI>Original date information cannot be preserved on an uploaded file;
<LI>The Select File dialog cannot be customized (e.g. it cannot be
configured to display images only);
<LI>The initial directory for the Select File dialog cannot be specified;
<LI>File size and type restrictions cannot be enforced before an upload begins.
</UL>
<P>
To overcome these limitations, we offer two client-side upload agents
that replace the traditional HTML enctype="multipart/form-data" form,
and offer a simple and user-friendly interface for selecting files and even
entire folders.
<P>
<B><A HREF="xupload.html">XUpload</A></B>
is an ActiveX control which looks and acts like a standard Windows list
control. Its only limitation that is runs under IE in a Windows environment only.
<P>
<B><A HREF="jupload.html">JUpload</A></B> is a Java applet which
is even more feature-rich than XUpload, but best of all is runs equally
well under the IE and Netscape browsers.
<P>
For more information on these powerful client-side products, visit their
respective pages at the <A HREF="http://www.aspupload.com">AspUpload.com</A> web site.
<P>
<A HREF="manual_share.html"><IMG BORDER="0" SRC="next.gif" ALIGN="RIGHT" ALT="Chapter 10: Using AspUpload in a Shared Environment"></A>
<A HREF="manual_unicode.html"><IMG BORDER="0" SRC="previous.gif" ALIGN="RIGHT" ALT="Chapter 8: Unicode Support"></A>
<P>
</BLOCKQUOTE>
</FONT>
<P>
<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
</TABLE>
<P>
<CENTER>
<A HREF="index.html"><IMG SRC="logo_small.gif" BORDER=0></A>
<BR>
<FONT Face=arial size=1>
Copyright © 1998 - 2001 <A HREF="http://www.persits.com">Persits Software, Inc.</A><BR>
All Rights Reserved<BR>
AspUpload® is a registered trademark of Persits Software, Inc.<BR>
Questions? Comments? <A HREF="MAILTO:info@aspupload.com">Write us!</A>
</CENTER>
</TD>
</TABLE>
</BASEFONT>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -