formitems_upload.asp
来自「aspupload」· ASP 代码 · 共 38 行
ASP
38 行
<!-- AspUpload Code samples: formitems_upload.asp -->
<!-- Invoked by formitems.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
Upload.Save
' access subdirectory specified by user
subdir = Upload.Form("subdir")
' Build path string
Path = "c:\upload\" & subdir
' Create path, ignore "already exists" error
Upload.CreateDirectory Path, True
' Save files to it. Our form has only one file item
' but this code is generic.
For Each File in Upload.Files
File.SaveAs Path & "\" & File.FileName
Response.Write "File saved as " & File.Path & "<BR>"
Next
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?