📄 filelist.asp
字号:
<!-- AspUpload Code samples: filelist.asp -->
<!-- Lists all files in the database -->
<!-- Copyright (c) 2001 Persits Software, Inc. -->
<!-- http://www.persits.com -->
<HTML>
<BODY>
<h3>Click on a link to download file from the database:</h3>
<%
' Build ADO connection string
Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(".\aspupload.mdb")
' If you use SQL Server, the connecton string must look something like this:
' Connect = "Provider=SQLOLEDB;Server=MYSRV;Database=master;UID=sa;PWD=xxx"
' Use ADO Recordset object
Set rs = Server.CreateObject("adodb.recordset")
' Reopen recordset to list all files
rs.Open "MYIMAGES", Connect, 2, 3
Count = 0
While Not rs.EOF
Response.Write "<A HREF=""filelist_download.asp?id=" & rs("id") & """>"
Response.Write Trim(rs("filename"))
Response.Write "</A><BR>"
rs.MoveNext
Count = Count + 1
Wend
Response.Write "<P>Total files in the database: " & Count
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -