试一下
不喜欢写这种,不太会写
[此贴子已经被作者于2007-7-5 8:33:42编辑过]
<%
Dim rs,Sql
set rs=server.createobject("adodb.recordset")
FLOWSN = SESSION("FLOWSN ")
FLOWSN = "240438"
NewOper = ""
SQL = ""
SQL = SQL & "SELECT * FROM Require_deal Where ATTACH_TYPE = '1' And FLOWSN = '" & FLOWSN & "'"
Rs.open SQL,CONN,1,1
I = 0
Do while Not rs.Eof
I = I + 1
If I > 1 then
response.write"<br>"
end if
str = "<a href="&trim(rs.fields("ATTACH_NAME"))&">" & trim(rs.fields("ATTACH_NAME")) & "</a> <a href=delf.asp?filename="&trim(rs.fields("ATTACH_NAME"))&">删除</a>"
response.write str
Rs.MoveNext
Loop
Rs.Close
If I = 0 then
response.write "."
End If
%>
为什么这段会显示为
">删除"" str = "" & trim(rs.fields("ATTACH_NAME")) & " 删除" response.write str Rs.MoveNext Loop Rs.Close If I = 0 then response.write "." End If %>
就是,从str后面的删除开始会全部显示在界面上哦???这样写有没有什么问题??
哈哈,用了版主写的,可以了,可是我的delf.asp 好像写的不对哦,帮我看看哦~
<%
dim getFile,arrpath
arrpath="./ITaccessories/01"
getfile=request.QueryString("filename")
Dim FSODel
Set FSODel=Server.CreateObject("Scripting.FileSystemObject")
if FSODel.FileExists(Server.MapPath("&arrpath&"/"&getFile&")) then
FSODel.DeleteFile (Server.MapPath("&arrpath&"/"&getFile&")),true
end if
response.Redirect("showf.asp")
%>