📄 admin_oa_delfile.asp
字号:
<!--#include file="../inc/conn.asp"-->
<%
dim action
action=request("action")
if action="delfile" then
dim id,filename,filename0,j,path1
ID=ReplaceBadChar(trim(request("ID")))
filename=replace(trim(request("filename")),"'"," ")
'response.write(id)
filename0=split(filename,",")
for j=0 to ubound(filename0)
path1=filename0(j)
call delpath(path1)
dim rs,sql,temp_file,file1
set rs=Server.CreateObject("ADODB.RECORDSET")
sql="Select oa_id,oa_title,oa_content,oa_author,uploadfiles,filename,filecount,filesize,fileext,oa_updatetime,oa_fruit from [oa_data] where oa_id="&id
rs.open sql,conn,1,3
temp_file=rs("uploadfiles")
file1=replace(temp_file,"|"&path1,"")
rs("uploadfiles")=file1
rs.update
rs.close
set rs=nothing
' response.write(file1)
next
response.redirect "admin_oa_modi.asp?oa_id="&id
sub delpath(path)
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If Fs.FileExists(server.mappath(Path)) Then
Set Os = Fs.GetFile(server.mappath(Path))
Os.Delete
Response.Write Path&"已被删除!<br>"
Else
Response.Write Path&"该不存在!数据已被删除<br>"
End If
end sub
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -