注册 登录
编程论坛 ASP技术论坛

[求助]一段用FSO刪除html代碼,可是怎麼測試,html文件都不會刪除

cnawe 发布于 2007-11-15 20:08, 599 次点击
Set Fso=Server.Createobject("Scripting.FileSystemObject")
if image<>"" and fso.DriveExists(server.mappath("../uploadfile\"&image))then
Fso.DeleteFile(server.mappath("../uploadfile\"&image))
end if
if fso.DriveExists(server.mappath("../company\"&id&".html")) Then
Fso.DeleteFile(server.mappath("../company\"&id&".html"))
end if
set fso=nothing
4 回复
#2
hmhz2007-11-15 20:28
Set Fso=Server.Createobject("Scripting.FileSystemObject")
if image<>"" then
if Fso.FileExists(Server.MapPath("../uploadfile/"&image)) Then
Fso.DeleteFile Server.MapPath("../uploadfile/"&image),True
end if
end if
if id<>"" then
if Fso.FileExists(Server.MapPath("../company/"&id&".html")) Then
Fso.DeleteFile Server.MapPath("../company/"&id&".html"),True
end if
end if
Set Fso=Nothing

[此贴子已经被作者于2007-11-15 20:31:22编辑过]

#3
kira0072007-11-15 20:42
唉!版主出马了,我们这些兵卒想 耀武扬威 下都没有机会了。
#4
cnawe2007-11-15 21:23
試試看.
#5
cnawe2007-11-15 21:45
,謝謝版主
1