求组!关于asp参数传递和保留的问题!搞了两天了!!
想写个基于FSO的文件管理起!但是返回上一目录中遇到到难题!请高手指点!这里返回上一级目录老是出错!还有显示当前目录文件夹也那里有问题!
希望大哥些帮帮忙!
这是演示地址:http://yuzhuang.host001.e80888.com/fso.asp
下面是代码
希望大哥些帮帮忙!
这是演示地址:http://yuzhuang.host001.e80888.com/fso.asp
下面是代码
<script language=javascript>
function chfolder(selectitem){
form=document.forms[0];
form.selectItem.value=selectitem;
form.submit();
}
</script>
<%
Dim fs, f, f1, s, sf
set fs=server.CreateObject("scripting.filesystemobject")
on error resume next
path="d:\e8088\echsop"
hostdir=""
selectItem=Request("selectItem")
hostdir=Request("hostdir")
hostdir2=hostdir+"\"+selectItem
basedir=request("basedir")
if basedir="" then
set f=fs.GetFolder(path)
else
if selectItem=".." then
lastbasedir=basedir
set f=fs.GetFolder(lastbasedir)
else
path=basedir+"\"+selectItem
set f=fs.GetFolder(path)
end if
end if
set sf=f.SubFolders
%>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" >
<form name=form1 method=post action="fso.asp"/>
<input type=hidden name="selectItem" value=""/>
<input type=hidden name="basedir" value="<%=path%>" />
<input type=hidden name="hostdir" value="<%=hostdir2%>" />
<tr >
<td colspan="3" background="image/floder_top.gif" height="26"> </td>
</tr>
<tr>
<td background="image/floder_left.gif" width="7" ></td>
<td>
<table width="100%" border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
<tr>
<td height="33" colspan="5" valign="middle" background="image/dir_back.gif">
<table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" width="24"><img src="image/back_floder.gif" width="24" height="24" border="0" /></td>
<td width="110" ><a href="javascript:chfolder('..');" title="返回上级目录">返回上级目录</a></td>
<td width="44" style="border:0px;" background="image/dir_left.gif"></td>
<td background="image/dir_middle.gif" width="560" style="border:0px;"><%=hostdir2%></td>
<td width="44" style="border:0px;" background="image/dir_right.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="image/type.gif" > 名称</td>
<td align="right" background="image/type.gif" height="33">大小</td>
<td background="image/type.gif" > </td>
<td align="left" background="image/type.gif">类型</td>
<td align="left" background="image/type.gif">修改时间</td>
<%
For Each f1 in sf
%>
</tr>
<tr>
<td>
<a href="javascript:chfolder('<%=f1.name%>');" title="点击选择文件夹<%=f1.name%>"><img src="image/folder.gif" width="16" height="16" border="0"/><%=f1.name%></a>
</td>
<td align="center"></td>
<td> </td>
<td align="left"><%=f1.Type%></td>
<td align="left"><%=f1.DateLastModified%></td>
</tr>
<%
next
%>
<%
set objFiles=f.Files
for each objFile in objFiles
%>
<tr>
<td> <%=objFile.name%></td>
<td align="right">
<%
if (objFile.Size\1024)<>"0" then
Response.Write(objFile.Size\1024&"Kb")
else
Response.Write(objFile.Size&"K")
end if
%>
<td> </td>
<td align="left"><%=objFile.Type%></td>
<td align="left"><%=objFile.DateLastModified%></td>
</tr>
<%
next
set f1=nothing
set f=nothing
set fs=nothing
%>
</table>
</td>
<td background="image/floder_right.gif" width="7"></td>
</tr>
<tr>
<td colspan="3" background="image/floder_bottom.gif" height="77"> </td>
</tr>
</table>
...全文
相关推荐
ASP.NET url参数传递加密及解密方法
ASP.NET URL参数传递加密及解密是Web应用程序中常见的安全措施,主要目的是保护用户数据的隐私,防止中间人攻击和数据篡改。在ASP.NET框架中,我们可以利用内置的加密解密工具来实现这一功能。
asp.net(C#)函数对象参数传递的问题
ASP.NET(C#)中的对象参数传递在ASP.NET开发中,C#是一种常用的编程语言。在C#中,函数参数的传递主要有两种方式:按值传递和按引用传递。对于对象类型,C#总是按引用传递,但这并不意
asp.net参数传递
### ASP.NET 参数传递详解在ASP.NET开发过程中,参数传递是一项基本且重要的功能,它能够帮助开发者实现页面间的数据交互。
免杀asp暗组免杀asp暗组
免杀asp暗组免杀asp暗组免杀asp暗组免杀asp暗组
asp.net 页面间参数传递
在设计时应综合考虑,确保参数传递的安全性和效率。


