📄 access_upload.asp
字号:
<!-- AspUpload Code samples: access_upload.asp -->
<!-- Invoked by access.asp -->
<!-- Copyright (c) 2001 Persits Software, Inc. -->
<!-- http://www.persits.com -->
<!-- include the file with constant declarations -->
<!--#include file="AspUpload.inc"-->
<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 so that we can access form items before file hits the disk
Upload.Save
Username = Upload.Form("username")
Password = Upload.Form("password")
If Username <> "" Then
' Specify domain name in first parameter, if necessary
Upload.LogonUser "", Username, Password
End If
AllowName = Upload.Form("ALLOW")
DenyName = Upload.Form("DENY")
' Save files to disk
For Each File in Upload.Files
File.SaveAs "c:\upload\" & File.FileName
Response.Write "File " & File.Path & " saved.<BR>"
' Set allowance
If AllowName <> "" Then
File.AllowAccess AllowName, GENERIC_ALL
Response.Write "User " & AllowName & " granted access on file " & File.Path & "<BR>"
End If
' Set denials
If DenyName <> "" Then
File.DenyAccess DenyName, GENERIC_ALL
Response.Write "User " & DenyName & " denied access on file " & File.Path & "<BR>"
End If
Next
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -