我已下载了一个上传组件fileup.dll,上传可以,但查询时,就不能出来了。我的机子
配置是win2000+iis4.0,在同样配置的另一台机子上,查询文件时,就能出来。为什么
会这样呢?
查询程序如下:
<%
folder="uploadInfo"
secFolder="changbInfo"
Set fs = CreateObject("Scripting.FileSystemObject")
secPaths=cstr(server.mappath(folder)&"/"&secFolder)
if not fs.folderexists(secPaths) then
strHtml="<font color=#CC3366 size=3>主服务器的文件夹丢失,请与管理员联系</font>"
else
if request("action")="del" then
filenameList=Request.form("filenamelist")
file_array=split(filenameList,";", -1, 0)
j=cint(Request("actionid"))
num1=UBound(file_array)
del_filename=file_array(j)
Set delFile=fs.GetFile(secPaths&"/"&del_filename)
delFile.Delete
end if
Set folder=fs.GetFolder(secPaths)
for each file in folder.Files
if fileList="" then
fileList=file.Name
dateList=file.DateCreated
else
fileList=fileList&";"&file.Name
dateList=dateList&";"&file.DateCreated
end if
Next
file_array=split(fileList,";", -1, 0)
date_array=split(dateList,";", -1, 0)
num=UBound(file_array)
strHtml="<table border=1 width='100%' cellspacing=0 cellpadding=0 bordercolor='#008080' bordercolordark='#99CCFF' bgcolor='#99CCFF'>"
strHtml=strHtml&"<tr>"
strHtml=strHtml&"<td align='center' nowrap><font color='#000080'><b>文件名</b></font></td>"
strHtml=strHtml&"<td align='center' nowrap><font color='#000080'><b>上传时间</b></font></td>"
strHtml=strHtml&"<td align='center' nowrap><font color='#000080'><b>查看内容</b></font></td>"
strHtml=strHtml&"<td align='center' nowrap><font color='#000080'><b>是否删除</b></font></td>"
strHtml=strHtml&"</tr>"
for i=0 to num
strHtml=strHtml&"<tr>"
strHtml=strHtml&"<td align='right' nowrap>"&file_array(i)&"</td>"
strHtml=strHtml&"<td align='right' nowrap>"&date_array(i)&"</td>"
strHtml=strHtml&"<td align='center' nowrap><a href=uploadInfo/changbInfo"&"/"&file_array(i)&" target=_blank>查看</a></td>"
strHtml=strHtml&"<td align='center' nowrap>"&"<button onclick=delClick("&i&")> 删 除</button>"&"</td>"
strHtml=strHtml&"</tr>"
Next
strHtml=strHtml&"</table>"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<script language="JavaScript">
function delClick(x)
{
if (confirm("确实要删除吗?")) {
document.thisForm.actionid.value=x;
document.thisForm.action="infoFind.asp?action=del";
document.thisForm.submit();
}
}
</script>
</head>
<body bgcolor="#F5DEB3">
<table border="0" width="50%" bgcolor="#31659C" height="38">
<tr>
<td width="56%" height="34" valign="middle" nowrap><b><font color="#FFFFFF" face="楷体_GB2312" size="4">文件查询:</font></b></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr style="height=9">
<td width="100%"></td>
</tr>
</table>
<%=strHtml%>
<form name="thisForm" align="left" method="POST">
<input type="hidden" name="filenamelist" value="<%=fileList%>">
<input type="hidden" name="actionid" value="">
</form>
</body>
</html>