⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goodsimagedelt.asp

📁 一个比较好的
💻 ASP
字号:
<!--#include File="../conndb.asp"-->
<!--#include file="isAdmin.asp"-->
<html>

<head>
<title>删除图片信息</title>
<style>BODY {	FONT-SIZE: 9pt}
TD {	FONT-SIZE: 9pt}
</style>
</head>
<body>

<%
  Dim ImageFile,id
  '读取商品编号参数
  id = Request.QueryString("id")
  '读取指定商品的数据到记录集rs
  Set rs = Conn.Execute("SELECT * FROM Goods WHERE id="&id)
  If Not rs.EOF Then
    ImageFile = rs("ImageFile")
    '删除图片
    filename = Server.MapPath("images\"&ImageFile)
    Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
    If (MyFileObject.FileExists(trim(filename))) Then
      MyFileObject.DeleteFile trim(filename)
      '更新表Goods中此商品的图片信息
      conn.execute("Update Goods set ImageFile='' where 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 + -