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