⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manual_misc.html

📁 aspupload
💻 HTML
📖 第 1 页 / 共 2 页
字号:
	&lt;TABLE BORDER=1 CELLSPACING=0><BR>
	&lt;TH>Name&lt;/TH>&lt;TH>Size&lt;/TH> &lt;TH>Type&lt;/TH> &lt;TH>Modified&lt;/TH> &lt;TH>Created&lt;/TH>&lt;TH>Attr&lt;/TH>&lt;TR><BR>
	&lt;% For Each Item in Dir %><P>

	&lt;% If Item.IsSubdirectory Then %><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;B>&lt;A HREF="DirectoryListing.asp?Dir=&lt;% = Server.URLEncode(Left(Dir.Path, Len(Dir.Path)-3)) &  Server.URLEncode(Item.FileName) & "\" %>">&lt;% = Item.FileName %>&lt;/A>&lt;/B>&lt;/TD><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;B>DIR&lt;/B>&lt;/TD><BR>
	&lt;% Else %><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;A HREF="Download.asp?Name=&lt;% =Server.URLEncode( Item.FileName )%>&File=&lt;% = Server.URLEncode(Left(Dir.Path, Len(Dir.Path)-3)) %>&lt;% =Server.URLEncode( Item.FileName )%>">&lt;% = Item.FileName %>&lt;/A>&lt;/TD><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD ALIGN=RIGHT>&lt;% = Item.Size %>&lt;/TD><BR>
	&lt;% End If %><P>

	&lt;TD>&lt;% = Item.FileType %>&lt;/TD><BR>
	&lt;TD>&lt;% = Item.LastWriteTime %>&lt;/TD><BR>
	&lt;TD>&lt;% = Item.CreationTime %>&lt;/TD><br>
	&lt;TD>&nbsp;<BR>
	&lt;%<BR>
	If Item.CheckAttribute( FILE_ATTR_READONLY) Then<BR>
	&nbsp;&nbsp;&nbsp;Response.Write "R"<BR>
	End If<BR>
	If Item.CheckAttribute( FILE_ATTR_HIDDEN) Then<BR>
	&nbsp;&nbsp;&nbsp;Response.Write "H"<BR>
	End If<BR>
	If Item.CheckAttribute( FILE_ATTR_SYSTEM) Then<BR>
	&nbsp;&nbsp;&nbsp;Response.Write "S"<BR>
	End If<BR>
	If Item.CheckAttribute( FILE_ATTR_ARCHIVE) Then<BR>
	&nbsp;&nbsp;&nbsp;Response.Write "A"<BR>
	End If<BR>
	%><BR>
	&lt;/TD>&lt;TR><BR>
	&lt;% Next %><BR>

	&lt;/TABLE><BR>
	&lt;/BODY><BR>
	&lt;/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">
	&lt;%<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>
	&nbsp;<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">
	
	&lt;HTML><BR>
	&lt;BODY><BR>
	&lt;H3>File Deletion&lt;/H3><BR>
	&lt;%<BR>
	&nbsp;&nbsp;&nbsp;Directory = "c:\" ' initial directory<BR>
	&nbsp;&nbsp;&nbsp;Set Upload = Server.CreateObject("Persits.Upload.1")<BR>
	&nbsp;&nbsp;&nbsp;Set Dir = Upload.Directory( Directory & "*.*", Request("sortby"))<P>

	&nbsp;&nbsp;&nbsp;' perform deletions if this is a form submission<BR>
	&nbsp;&nbsp;&nbsp;If Request("Delete") <> "" Then<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For Each Item in Request("FileName")<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write "<B>Deleting File " & Item & "&lt;/B>&lt;BR>"<BR>
				
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' uncomment next line to enable deletions.<BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' Upload.DeleteFile Directory & Item <BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<BR>
	&nbsp;&nbsp;&nbsp;End If<BR>
	%><P>

	&lt;h3>&lt;% = Dir.Path %>&lt;/h3><P>

	&lt;FORM ACTION="DeleteFiles.asp" METHOD="POST"><BR>
	&lt;TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0" STYLE="font-size: 8pt;"><BR>
	&lt;TR>&lt;TH>&amp;nbsp;&lt;/TH><BR>
	&lt;TH>&lt;A HREF="DeleteFiles.asp?sortby=1">Name&lt;/A>&lt;/TH><BR>
	&lt;TH>&lt;A HREF="DeleteFiles.asp?sortby=3">Size&lt;/A>&lt;/TH><BR>
	&lt;TH>&lt;A HREF="DeleteFiles.asp?sortby=2">Type&lt;/A>&lt;/TH><BR>
	&lt;TH>&lt;A HREF="DeleteFiles.asp?sortby=5">Date&lt;/A>&lt;/TH>&lt;/TR><BR>
	&lt;% For Each File in Dir %><BR>
	&lt;% If Not File.IsSubdirectory Then %><BR>
	&lt;TR><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;INPUT TYPE="CHECKBOX" VALUE="&lt;% = Server.HTMLEncode(File.FileName)%>" NAME="FileName">&lt;/TD><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;% = File.FileName %>&lt;/TD><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;% = File.Size %>&lt;/TD><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;% = File.FileType %>&lt;/TD><BR>
	&nbsp;&nbsp;&nbsp;&lt;TD>&lt;% = File.LastWriteTime %>&lt;/TD<BR>>
	&lt;/TR><BR>
	&lt;% End If<BR>
	Next<BR>
	%><BR>
	&lt;TR><BR>
	&lt;TD COLSPAN="5"><BR>
	&lt;INPUT TYPE="HIDDEN" NAME="sortby" VALUE="&lt;% = Request("sortby") %>"><BR>
	&lt;INPUT TYPE="SUBMIT" NAME="Delete" VALUE="Delete selected files"><BR>
	&lt;/TD><BR>
	&lt;/TR><BR>
	&lt;/TABLE><BR>
	&lt;/FORM><BR>
	&lt;/BODY><BR>
	&lt;/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>
	&nbsp;<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">
	&lt;%<BR>
	Set Upload = Server.CreateObject("Persits.Upload")<BR>
	Upload.Save "c:\Upload" <BR>
	For Each File in Upload.Files <BR>
	&nbsp;&nbsp;&nbsp;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 &lt;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>&nbsp;
	</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 &copy; 1998 - 2001 <A HREF="http://www.persits.com">Persits Software, Inc.</A><BR>
	All Rights Reserved<BR>
	AspUpload&reg; 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 + -