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

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

一個asp+ 版本的 Active Server Explorer

[摘要]/*豆腐制作 都是精品http://www.asp888.net 豆腐技術站如轉載 請保留版權信息*/很多人可能都用過 chinaAsp 出的 ase 可以對 服務器上的文件進行各種操作,在這里我們...
/*
豆腐制作 都是精品
http://www.asp888.net 豆腐技術站
如轉載 請保留版權信息
*/
很多人可能都用過 chinaAsp 出的 ase 可以對 服務器上的文件進行各種操作,在這里我們也來
講一個在 asp plus 下實現 ase 的程序 由于時間倉促 和本來就是 出于 演示的目的 本程序只演示了最簡單的 情況 至于 上傳 和編輯文本文件 我在 以前的文章里 都已經 講過了,大家可以到 http://www.asp888.net 查看技術欄目里面的文章
首先是 列出 機器上 的盤符
<% @Page Language="C#" %>
<% @Import Namespace="System.IO" %>
<%
string[] LocalDriver = Directory.GetLogicalDrives();
int intNum = LocalDriver.Length;
Response.Write("<ul>");
for (int i=0; i < intNum; i++)
{
%>
<li><a href="dir.aspx?dir=<%=Server.UrlEncode(LocalDriver[i])%>"><%=LocalDriver[i]%></a></li>
<%
}
Response.Write("</ul>");
%>
列出所選擇的盤符 上的目錄
<% @Page Language="C#" %>
<% @Import Namespace="System.IO" %>
<%
string strDir2List = Server.UrlDecode(Request.QueryString.Get("dir"));
Directory thisOne = null;
try
{
thisOne = new Directory(strDir2List);
// 得到當前的目錄創建時間
Response.Write("<p>當前所在目錄: " + thisOne.ToString() + "</p>");
Directory[] Dir = thisOne.GetDirectories();
Response.Write("<ul>");
for (int i=0; i < Dir.Length; i++)
{
Response.Write("<li><a href=\"dir.aspx?dir=");
Response.Write(Server.UrlEncode(Dir[i].FullName));
Response.Write("\">" + Dir[i].Name);
Response.Write("</a><br>");
}
Response.Write("</ul>");

File[] Files = thisOne.GetFiles();
Response.Write("<ul>");
for (int i=0; i < Files.Length; i++)
{
Response.Write("<li><a href=\"viewfile.aspx?file=");
Response.Write(Server.UrlEncode(Files[i].FullName));
Response.Write("\">" + Files[i].Name);
Response.Write("</a><br>");
}
Response.Write("</ul>");
}
catch (Exception e)
{
Response.Write("錯誤: <i>");
Response.Write(e.ToString() + "</i>");
Response.End();
}
%>
查看文件的詳細信息:
<% @Page Language=VB %>
<% @Import Namespace="System" %>
<% @Import Namespace="System.IO" %>
<html>
<head><title>編輯文件</title></head>
<body>
<%
dim File as string
File = Request.QueryString.Get("file")
thisOne = new File(File)
'string File = Request.QueryString.Get("file");
'File thisOne = new File(File);
%>
<table>
<tr><td>文件名稱:</td><td><%=thisOne.Name%></td></tr>
<tr><td>文件的全名:</td><td><%=thisOne.FullName%></td></tr>
<tr><td>所在目錄:</td><td><%=thisOne.DirectoryName%></td></tr>
<tr><td>文件創建時間:</td><td><%=thisOne.CreationTime.ToString()%></td></tr>
<tr><td>文件大小:</td><td><%=thisOne.Length.ToString()%> Bytes</td></tr>
<tr><td>最近一次的存取時間:</td><td><%=thisOne.LastAccessTime.ToString()%></td></tr>
<tr><td>最近一次更新時間:</td><td><%=thisOne.LastWriteTime.ToString()%></td></tr>
</table>
<%
ss=split(thisOne.Name,".")
fileent=lcase(ss(ubound(ss)))
if fileent="txt" or fileent="asp" or fileent="aspx" then
theReader = thisOne.OpenText()
Do
strIn = theReader.ReadLine()
response.write(strIn)
Loop Until strIn = Null

%>
<form action="savefile.asp" method=post>
<textarea cols=40 rows=30><%=strIn%></textarea>
<input type=hidden name=filename value="<%=thisOne.FullName%>">
<br>
<input type=submit value="保存更改">
</form>

<%
end if
%>
</body>
</html>
好了一個完整的 ase 程序還需要 刪除 拷貝 移動和上傳 編輯 相信大家在 看完這個程序以后 一定會 有辦法 經過 簡單 的改動 就 可以實現
這個程序的完整例子可以在 http://www.asp888.net/download/asp/ase.zip 下載
謝謝大家

作者:豆腐()





主站蜘蛛池模板: 青草欧美 | 欲色影视 | 色88888久久久久久影院 | 天天射天天拍 | 欧美综合一区二区三区 | 性日韩精品 | 热久久综合网 | 日本成人免费在线 | 青青久久精品国产 | 午夜视频吧 | 欧美一级三级在线观看 | 深夜视频在线观看免费 | 深夜视频免费看 | 婷婷免费在线 | 欧美在线综合 | 台湾美性中文娱乐网 | 日韩一级一欧美一级国产 | 欧美视频在线播放 | 四虎影院com | 四虎在线精品 | 日韩久草 | 三级国产4国语三级在线 | 亚欧aⅴ天堂在线 | 欧美亚洲另类综合 | 四虎网站 | 天天躁日日躁成人字幕aⅴ 天天躁日日躁 疯人影院 | 一级做a爰片久久毛片免费 一级做a爰片久久毛片美女图片 | 性欧美日本 | 在线精品91青草国产在线观看 | 四虎影城库 | 日韩在线观看精品 | 涩涩涩丁香色婷五月网视色 | 伊人热人久久中文字幕 | 色偷偷亚洲女性天堂 | 青草影视 | 日本在线网站 | 欧美一区二区三区免费观看视频 | 在线视免费频观看韩国aaa | 亚洲欧美一级视频 | 我色综合 | 亚欧成人一区二区 |