类似于iis浏览的功能_FSO专题

<!---将此文件存为folder_list.asp看看效果就知道了加上权限就可以方便自己了,--->

<%

'const_domain_name为域名最后不要加斜杠

const const_domain_name="http://localhost"

%>

<style>

b,img,a{font-size:9pt;line-height:150%;text-decoration:none;color:#0000cc;}

span{font-size:12pt;}

</style>

<%

'------------------------------------------------显示当前目录下的子目录和文件

sub list

Dim fso, f, f1, fc, s

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.GetFolder(server.MapPath("."))

set fs=f.SubFolders

Set fc =f.Files

For Each fss in fs

dim folder_name

folder_name=fss.name

%>

<a href="folder_list.asp?act=list_cur&cur_path=<%=fss%>"><span style="font-family:wingdings">0</span><%=folder_name%></a><br>

<%

Next

%>

<%

For Each f1 in fc

dim filename

filename=f1.name

%>

<a href="<%=p2v_path(f1)%>"><span style="font-family:wingdings 2">/</span><%=filename%></a><br>

<%

Next

set fso=nothing

end sub

%>

<%

'------------------------------------------------显示指定路径下的目录和文件

sub list_cur

Dim fso, f, f1, fc, s

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.GetFolder(request("cur_path"))

set fs=f.SubFolders

Set fc =f.Files

For Each fss in fs

dim folder_name

folder_name=fss.name

%>

<a href="folder_list.asp?act=list_cur&cur_path=<%=fss%>"><span style="font-family:wingdings">0</span><%=folder_name%></a><br>

<%

Next

%>

<%

For Each f1 in fc

dim filename

filename=f1.name

%>

<a href="<%=p2v_path(f1)%>"><span style="font-family:wingdings 2">/</span><%=filename%></a><br>

<%

Next

set fso=nothing

end sub

%>

<%

'------------------------------------------------显示上级目录的子目录和子文件

sub list_parent

on error resume next

Dim fso, f, f1, fc, s

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.GetFolder(display_cur_path)

set fs=f.SubFolders

Set fc =f.Files

For Each fss in fs

dim folder_name

folder_name=fss.name

%>

<a href="folder_list.asp?act=list_cur&cur_path=<%=fss%>"><span style="font-family:wingdings">0</span><%=folder_name%></a><br>

<%

Next

%>

<%

For Each f1 in fc

dim filename

filename=f1.name

%>

<a href="<%=p2v_path(f1)%>"><span style="font-family:wingdings 2">/</span><%=filename%></a><br>

<%

Next

set fso=nothing

on error goto 0

end sub

'---------------------------------------------得到上级目录的路径

function get_parent_folder()

on error resume next

str=display_cur_path

str_find="\"

str_int=InStrRev (str,str_find)-1 '得到上一级目录的路径

get_parent_folder=mid(str,1,str_int)

err.clear

end function

'-----------------------------------------------将文件路径转为www发布的路径这样就可以下载了

function p2v_path(p_path)

'p_path为硬盘上的物理路径

dim host

host=lcase(server.MapPath("\"))

p_path=lcase(p_path)

p2v_path=replace(p_path,host,const_domain_name)

end function

'-----------------------------------------------显示当前所在的路径

function display_cur_path()

cur_path=request("cur_path")

if cur_path="" then

display_cur_path=server.MapPath(".")

else

display_cur_path=cur_path

end if

set fso=nothing

end function

sub main

%>

<a href="folder_list.asp?act=list_parent&cur_path=<%=get_parent_folder%>">向上</a> <b><a href="javascript:void(null)"><%=display_cur_path%></a></B><p>

<%

select case request("act")

case "list_parent"

list_parent

case "list_cur"

list_cur

case else

list

end select

end sub

main

%>

时间: 2024-08-02 10:29:53

类似于iis浏览的功能_FSO专题的相关文章

类似于iis浏览的功能

iis <!---将此文件存为folder_list.asp看看效果就知道了加上权限就可以方便自己了,---><%'const_domain_name为域名最后不要加斜杠const const_domain_name="http://localhost"%><style>b,img,a{font-size:9pt;line-height:150%;text-decoration:none;color:#0000cc;}span{font-size:1

FSO的强大功能_FSO专题

复制代码 代码如下: <HTML>  <HEAD>  <TITLE>笨狼代码大管家</TITLE>  <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style>  body  {  font-size:12;  BACKGROUND: #DADADA;  margin-left:5;  }  .folde

IE10新增禁用选项卡浏览的功能

在IE6时代,浏览器是没有选项卡分页浏览这项功能的.从IE7开始,IE浏览器便推出了选项卡功能,可以让我们在一个IE窗口内同时打开多个网页,这个功能一直延续到目前的IE10. 在IE7.IE8的时候,这项功能一直跟别的浏览器一样.到了IE9,微软对选项卡这项功能进行了改进,引入了标签组的功能.不过在IE7至IE9时代,浏览器必须开启这项功能.到了IE10,微软给用户更多选择,可以随意开启或禁用选项卡的功能.如果你一直都怀念IE6那种窗口浏览模式,可以在IE10中禁用选项卡浏览功能. 操作方法:

后台-android 实现一个类似于闹钟的提醒功能

问题描述 android 实现一个类似于闹钟的提醒功能 功能详细: 从数据库中获取时间,然后只要时间到了,demo在后台运行就可以使用这个闹钟,弹出一个我自定义的dialog,通知栏上也有显示...通知栏我会了,就是不知道怎么使用自定义的dialog,铃声,以及定义时间 解决方案 可以使用servers 服务,设置一个监听事件,检测系统时间,然后等到了你设定的时间就给出提示 解决方案二: RecordStore实现类似于SQL功能toast(uiview) 类似于android的iostoast

ASP.NET开发中怎么实现多图片上传并浏览的功能

问题描述 ASP.NET开发中怎么实现多图片上传并浏览的功能 ASP.NET开发中怎么实现多图片上传并浏览的功能,可以用什么控件来做? 解决方案 用jquery或者flash,自带的控件好像是不可以 解决方案二: 可以试试Aurigma Upload Suite,功能挺强大的一款图文上传控件,有多个版本,可以根据自己的需求进行选择.

thinkphp浏览历史功能实现方法_php实例

本文实例讲述了thinkphp浏览历史功能实现方法,分享给大家供大家参考.具体实现方法分析如下: 历史浏览功能都是使用了cookie功能记录用户信息放到了本地了,这样我们只要读取存储在cookies中的值就可以了,下面来给大家介绍一个基于thinkphp 实现浏览历史功能例子. 就像浏览器一样,能够记录访问了哪些页面,这样能够减少时间,下面我们实现浏览历史的功能. 1.在你需要记录浏览数据的产品或新闻页面,记录cookie需要保存的信息,例如下面这行代码,把页面ID,产品名称,价格,缩略图,网址

应用-IIS 浏览WEB的错误405问题

问题描述 IIS 浏览WEB的错误405问题 在浏览WEB时,刚进去的登录界面正常,但是点击登录之后就出现错误"应用程序"MYWEBSITE"中的服务器错误" "HTTP 错误 405.0 - Method Not Allowed 无法显示您正在查找的页面,因为使用了无效方法(HTTP 谓词)." 请问这个该怎么办呢?详细内容如下图: 解决方案 原因客户端没有在web服务器中得到某些方法的权限,比如put,post,delete.或者客户端没有得

IIS浏览网页乱码,怎么解决?

问题描述 IIs浏览aspx页面是乱码,原来还好好的,就是新的网站程序覆盖了老的,就这样了.服务器上装了asp1.0和2.0环境,怎么解决啊,急死了! 解决方案 解决方案二:设置页面编码没有?解决方案三:<system.web><globalizationfileEncoding="gb2312"requestEncoding="gb2312"responseEncoding="gb2312"culture="zh-C

C# DataGrid 数据绑定后怎么实现类似于excel的查找功能,通过某个字段的值找到所在的行

问题描述 应为数据量太大想通过货物名称搜索的方式找到需要采购的某条来输入采购数量,实现的效果就是当输入完货物名称后该货物展现在当前页 解决方案 解决方案二:小弟第一次发帖,希望有大神们支招解决方案三:直接去查询这个结果集啊,比如DataGrid是绑定到list上面的,那么就去这个list里面搜索后更新DataGrid的datacontext就行了解决方案四:用DataGrid的数据源集合去查,包装成一个List<>集合,用linq去查比较方便.DataCollection=DataList.w