📄 twofolders_upload.asp
字号:
<!-- AspUpload Code samples: twofolders_upload.asp -->
<!-- Invoked by twofolders.asp -->
<!-- Copyright (c) 2001 Persits Software, Inc. -->
<!-- http://www.persits.com -->
<HTML>
<BODY>
<%
Set Upload = Server.CreateObject("Persits.Upload")
' we use memory uploads, so we must limit file size
Upload.SetMaxSize 100000, True
' Save to memory. Path parameter is omitted
Count = Upload.Save
' Two files must be selected
If Count <> 2 Then
Response.Write "You must select 2 files."
Response.End
End If
' Create two folders, ignore "already exists" error
Upload.CreateDirectory "c:\upload\Folder1", True
Upload.CreateDirectory "c:\upload\Folder2", True
' Obtain File objects
Set File1 = Upload.Files("FILE1")
Set File2 = Upload.Files("FILE2")
' Build name from session ID
Name = Session.SessionID
' Save
File1.SaveAs "c:\upload\Folder1\" & Name & File1.Ext
Response.Write "File 1 is saved under " & File1.Path & "<BR>"
File2.SaveAs "c:\upload\Folder2\" & Name & File2.Ext
Response.Write "File 2 is saved under " & File2.Path & "<BR>"
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -