📄 openblob.asp
字号:
<!--#include virtual="/include/DBCon.inc"-->
<%
Function SetForDisplay(field, contentType)
contentType = LCase(trim(contentType))
nFieldSize = field.ActualSize
bytes = field.GetChunk(nFieldSize)
Session("Bytes") = bytes
Session("Type") = contentType
End Function
%>
<%
sql = "select * from oil_file where file_id='" &request("ID")& "'"
Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.CursorLocation = 3
oRS.Open sql, conn
SetForDisplay oRS("file_blob"),ors("file_cs_type")
Set oRS.ActiveConnection = Nothing
%>
<%
response.Expires = 0
response.Buffer = True
response.Clear
response.contentType = Session("Type")
response.BinaryWrite Session("Bytes")
Session("Type") = ""
Session("Bytes") = ""
response.End
%>
<!--#include virtual="/include/DBClose.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -