六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個免費提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺!

在服務(wù)器端選擇文件

[摘要]一個在服務(wù)器端選擇文件的小程序,在要插入服務(wù)器端的文件,例如服務(wù)器端已經(jīng)上傳的圖片,或者是菜單管理中選擇要執(zhí)行的文件,都是有用的,當(dāng)然,還可以改作它用,就看你的需要了。 限于時間,沒能打它做成像windows的打開文件窗口一樣的效果,哪位網(wǎng)友做了,告訴一聲啊,遲些我自己抽得出時間也會做的,希望能與...

一個在服務(wù)器端選擇文件的小程序,在要插入服務(wù)器端的文件,例如服務(wù)器端已經(jīng)上傳的圖片,或者是菜單管理中選擇要執(zhí)行的文件,都是有用的,當(dāng)然,還可以改作它用,就看你的需要了。

限于時間,沒能打它做成像windows的打開文件窗口一樣的效果,哪位網(wǎng)友做了,告訴一聲啊,遲些我自己抽得出時間也會做的,希望能與大家一起進(jìn)步。

<%@ Language=VBScript codePage="936"%>
<% option explicit %>

<%
function getFileName(strPath)
dim filename
filename = mid(strPath,instrrev(strPath,"\")+1)
getFileName = filename
end function
%>

<HTML>
<HEAD>
<title>Noteless Valley(lijun.org)程序示例</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
<style type=text/css>
BODY
{
font-size: 16px;
border-top-style: none;
font-family: Verdana, 宋體;
border-right-style: none;
border-left-style: none;
background-color: white;
border-bottom-style: none;
}
A
{
text-decoration: none;
}
A:hover
{
text-decoration: underline;
}
</style>

<script language=javascript>
function selFile(filename) {
lblMsg.innerText = filename;
}
</script>
</HEAD>
<body>
<%
dim strSvrPath, strCurrentDirectory
strSvrPath = request.QueryString("path")
if strSvrPath = "" then
strSvrPath = request.ServerVariables("SCRIPT_NAME")
strSvrPath = mid(strSvrPath,1,instrrev(strSvrPath,"/")) '在這里設(shè)定初始目錄,此處我設(shè)為根目錄
end if
strCurrentDirectory = server.MapPath(strSvrPath)
response.Write "當(dāng)前目錄:" & strSvrPath & "<br>"

dim fso, folder, subfolder, files, item
set fso = server.CreateObject("scripting.filesystemobject")
set folder = fso.GetFolder(strCurrentDirectory)
set subfolder = folder.SubFolders

if strSvrPath <> "/" then
response.Write "<a href=?path=" & mid(strSvrPath,1,instrrev(mid(strSvrPath,1,len(strSvrPath)-1),"/")) & ">[To Parent Directory]</a>" & "<br>"
end if
for each item in subfolder
response.Write "<a href=?path=" & strSvrPath & getFileName(item) & "/><font face=wingdings>0</font>" & _
getFileName(item) & "</a><br>"
next

set files = folder.Files
for each item in files
'取絕對路徑
' response.Write "<a href=javascript:selFile('" & strSvrPath & getFileName(item) & _
' "');><font face=wingdings>3</font>" & getFileName(item) & "</a><br>"
'取文件名
' response.Write "<a href=javascript:selFile('" & getFileName(item) & "');><font face=wingdings>3</font>" & _
' getFileName(item) & "</a><br>"
'取相對某目錄的相對路徑,本例為“/myweb/”
response.Write "<a href=javascript:selFile('" & replace(strSvrPath,"/myweb/","") & getFileName(item) & "');><font face=wingdings>3</font>" & _
getFileName(item) & "</a><br>"
next
set fso = nothing
%>
<p id=lblMsg></p>
</body>
</HTML>




主站蜘蛛池模板: 欧美在线观看不卡 | 亚欧日韩毛片在线看免费网站 | 中文字幕欧美在线 | 天天色综合影视 | 天天噜天天噜噜在线视频 | 天天干亚洲 | 欧美亚洲激情在线 | 日韩高清在线日韩大片观看网址 | 亚洲国产第一页 | 日韩视频在线精品视频免费观看 | 亚洲视频重口味 | 色婷婷一区二区三区四区成人 | 天天干夜夜拍 | 日本欧美人xxxxx在线观看 | 日本免费专区 | 欧美在线视频观看 | 亚洲最大成人网色 | 亚洲成年网 | 日本亚洲欧洲高清有码在线播放 | 日韩色在线观看 | 中文字幕一二三四区 | 青青草原免费在线观看视频 | 奇米五月| 中文字幕一区婷婷久久 | 天天想天天干 | 日韩欧美91 | 人人揉揉香蕉 | 欧美一级黄色片 | 日韩中文字幕a | 色天天干 | 午夜三级在线观看 | 日韩有码第一页 | 雪白丰满丝袜长腿白嫩在线 | 青青青视频在线播放视频 | 日本大片在线看 | 欧美天天性影院 | 亚洲性久久久影院 | 四虎永久在线精品影院 | 亚洲国产亚洲综合在线尤物 | 人人干人人上 | 欧美亚洲另类综合 |