📄 bookimagedelt.asp
字号:
<!--#include File="conndb.asp"-->
<html>
<head>
<title>删除图片信息</title>
<style>BODY { FONT-SIZE: 9pt}
TD { FONT-SIZE: 9pt}
</style>
</head>
<body>
<%
Dim ImageFile,id
'读取图书编号参数
id = Request.QueryString("book_id")
'读取指定图书的数据到记录集rs
Set rs = Conn.Execute("SELECT * FROM book_info WHERE book_id="&id)
If Not rs.EOF Then
ImageFile = rs("book_ImageFile")
'删除图片
filename = Server.MapPath("images\"&ImageFile)
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
If (MyFileObject.FileExists(trim(filename))) Then
MyFileObject.DeleteFile trim(filename)
conn.execute("Update book_Info set book_ImageFile='' where book_id="&id)
End If
End If
%>
<script language="JavaScript">
opener.location.reload();
window.close();
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -