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

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

在服務器端選擇文件

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

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

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

<%@ 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,"/")) '在這里設定初始目錄,此處我設為根目錄
end if
strCurrentDirectory = server.MapPath(strSvrPath)
response.Write "當前目錄:" & 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>




主站蜘蛛池模板: 天堂网中文字幕 | 日日摸狠狠的摸夜夜摸 | 在线成人免费观看国产精品 | 欧美做a一级视频免费观看 欧美坐爱视频 | 深爱五月网 | 五月婷综合 | 人体自拍亚洲综合图区 | 天干夜天干天干国产 | 视频在线h | 日韩中文字幕精品视频在线 | 探花 在线| 日日夜夜天天操 | 青草久久网 | 天天色综合三 | 四虎影视免费在线 | 香蕉视频97 | 色综合久久综合中文小说 | 欧洲色网站 | 婷婷综合七月激情啪啪 | 日日夜夜天天操 | 日本欧美国产精品第一页久久 | 日本欧美在线 | 日韩无套| 日韩爱爱网| 日本成人免费在线观看 | 青青草美女 | 性刺激欧美三级在线观看 | 天堂a | 亚洲综合一 | 午夜影院普通 | 亚洲最新中文字幕 | 日韩欧美一区二区三区不卡在线 | 日韩在线观看中文字幕 | 午夜资源在线 | 亚洲成a人片在线观看中文动漫 | 欧美中文字幕在线 | 日韩经典欧美一区二区三区 | 一二三四免费高清观看在线观看 | 日本激情一区二区三区 | 影音色资源 | 日韩一区二区在线免费观看 |