📄 readdoc.asp.bak
字号:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'从数据库中读取在线编辑的文件数据
docid = Request.querystring("docid")
Dim RS
Set RS = Server.CreateObject("ADODB.Recordset")
' docid = Request.querystring("docid")
if docid <> "" then
RS.Open "files", conn, adOpenStatic, adLockReadOnly 'open static for search,read only
RS.Find "fid=" & docid
If Not RS.EOF THEN
Response.AddHeader "Content-Disposition","attachment; filename=" & RS("fname")
Response.BinaryWrite(RS("fcontent"))
end if
ELSE
docid = Request.querystring("templateid")
RS.Open "templates", conn, adOpenStatic, adLockReadOnly 'open static for search,read only
RS.Find "tid=" & docid
If Not RS.EOF THEN
Response.AddHeader "Content-Disposition","attachment; filename=" & RS("tname")
Response.BinaryWrite(RS("tcontent"))
END IF
RS.Close
Set Rs= Nothing
Closeconn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -