📄 test.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
session.CodePage=65001
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"
Response.Charset="UTF-8"
Server.ScriptTimeout = 900
Function FormatName(FileExt)
Dim RanNum
Randomize
RanNum = Int(90000*rnd)+10000
FormatName = Year(now)&Month(now)&Day(now)&Hour(now)&Minute(now)&Second(now)&RanNum&FileExt
End Function
dim TotalBytes,Ads,filename
TotalBytes = Request.TotalBytes
filename=FormatName(".jpg")
Set Ads = Server.CreateObject("Adodb." & "Stream")
With Ads
.Type = 1
.Open
.Write request.BinaryRead(TotalBytes)
.SaveToFile Server.MapPath("photo/"&filename), 2
.Cancel()
.Close()
End With
Set Ads=nothing
Response.write("success=OK&filename="&filename)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -