错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'ubound'
/studyyard/admin/upload/delfile.asp, 第 15 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2)
网页:
GET /studyyard/admin/upload/delfile.asp
下面是我的代码麻烦帮忙检查一下,mypath接收上一页的多个路径
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../../Connections/upload.asp" -->
<% dim mypath
mypath="UpLoadFile/"&request.querystring("F_Name") %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body><% Dim objFSO '声明一个名称为 objFSO 的变量以存放对象实例
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
for i=0 to ubound(mypath)-1
If objFSO.FileExists(Server.MapPath(mypath(i))) Then
objFSO.DeleteFile Server.MapPath(mypath(i)),True
Response.Write "已经成功地对文件"&Server.MapPath("mypath")&"进行了删除"
Else
Response.Write Server.MapPath("mypath")&"不存在,无法进行删除"
End If
next
Set objFSO = Nothing '释放 FileSystemObject 对象实例内存空间 %>
</body>
</html>
[ 本帖最后由 yangqian302 于 2008-5-21 12:17 编辑 ]