delphoto.jsp
来自「基于B/S的商贸管理系统」· JSP 代码 · 共 33 行
JSP
33 行
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="checkfinaler.jsp"%>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ include file="../conn/conn.jsp"%>
<%@ page import="com.lynews.news.*"%>
<%
int id = Integer.parseInt((String)request.getParameter("id"));
stmt = con.createStatement() ;
rs=stmt.executeQuery("SELECT * from photo where id="+id);
rs.next();
String picName = rs.getString("photoname");
String phototext = rs.getString("phototext");
String pathName = application.getRealPath(picName) ;
boolean del = DelHtml.del(pathName);
String sql="delete from photo where id="+id;
stmt.executeUpdate(sql);
String sql2="delete from showbar where showphoto='"+picName+"'";
stmt.executeUpdate(sql2);
response.sendRedirect("photo.jsp");
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?