?? 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 + -