最も実用的なWebページSpecial Effectコードを収集してください!
listdrives.aspx
<%@page言語= c#%>
<%@import namespace = systemm%>
<%@import namespace = system.io%>
<%
string qdrives = Environment.osversion.toString();
string qnewline = Environment.systemDirectory.ToString();
string qmo = environment.workingset.tstring();
int qtick = Environment.tickcount;
qtick/= 60000;
string [] achdrivers = directory.getLogicalDrives();
int nnumofdrives = achdrives.length;
Response.write(システムは:);
Response.write(qdrives);
Response.Write(<br>);
Response.write(利用可能なメモリは:);
Response.Write(QMO);
Response.Write(<br>);
Response.Write(前回再起動しました);
respons.write(qtick.toString());
Response.write(minute);
Response.Write(<br>);
Response.Write(<br>);
Response.Write(<br>);
Response.Write(ディスクを表示:);
Response.Write(<ul>);
for(int i = 0; i <nnumofdrives; i ++)
{{
Response.write(<li> <a href =/listdir.aspx?dir =);
respons.write(server.urlencode(achdrives [i]));
Response.write(/> + achdrives [i]);
Response.Write(</a> <br>);
}
Response.Write(</ul>);
%>
listdir.aspx
<%@page言語= c#debug = true%>
<%@import namespace = system.io%>
<%
string strdir2list = request.querystring.get(dir);
ディレクトリthatone = null;
試す
{{
thisne = new Directory(strdir2list);
// auslesen der eigenschaften der verzeichnisses
Response.Write(<p> Create Time: + thisne.creation.toString() + </p>);
ディレクトリ[] subdirectories = thisne.getDirectories();
Response.Write(<ul>);
Response.Write ------------------------------------------------------------------------------------ ---------------------------------------------);
Response.Write(<br>);
for(int i = 0; i <subdirectories.length; i ++)
{{
Response.write(<li> <a href =/listdir.aspx?dir =);
Response.write(server.urlencode(subdirectories [i]。fullname));
Response.write(/> + subdirectories [i] .name);
Response.Write(</a> <br>);
}
Response.Write(</ul>);
file [] thefiles = thisne.getFiles();
Response.Write(<ul>);
Response.Write(--------------------------------------------------------------------------------------------------------------------------- ------------);
Response.Write(<br>);
for(int i = 0; i <the <thefiles.length; i ++)
{{
Response.write(<li> <a href =/showfile.aspx?file =);
Response.write(server.urlencode(thefiles [i]。fullname));
respons.write(/> + thefiles [i] .name);
Response.Write(</a> <br>);
}
Response.Write(</ul>);
}
キャッチ(例外e)
{{
Response.Write(この関数は、次の理由で実装できません:);
respons.write(e.tostring() +);
Response.End();
}
%>
showfile.aspx
<%@page言語= c#debug = true%>
<%@import namespace = system.io%>
<html>
<head> <title>ファイル情報</title> </head>
<body>
<%
string strfile2show = request.querystring.get(file);
ファイルthisne = new file(strfile2show);
%>
<表>
<tr> <td>ファイル名:</td> <td> <%= thatone.name%> </td> </tr>
<ter> <td>フルネーム:</td> <td> <%= thatone.fullname%> </td> </tr>
<ter> <td>ファイルの作成日:</td> <td> <%= thatone.creationTime.toString()%> </td> </tr>
<ter> <td>ファイルサイズ:</td> <td> <%= thatone.length.toString()%> bytes </td> </tr>
<ter> <td>最後の使用時間:</td> <td> <%= thisne.lastac sensesstime.toString()%> </td> </tr>
<ter> <td>最後の変更時間:</td> <td> <%= thisone.lastwritetime.tostring()%> </td> </tr>
</table>
<%
StreamReader thereader = thisne.opentemt();
char [] thebuffer = new char [1000];
int nream = thereader.readblock(thebuffer、0、1000);
Response.Write(<br>);
Response.write(ファイルコンテンツプレビュー:);
Response.Write(<br>);
Response.write(<pre>);
Response.write(server.htmlencode(new String(thebuffer、0、nrad));
respons.write(</pre>);
%>
</body>
</html>
管理機能を豊かにし、統合のアップロード、変更、削除、その他の管理機能です
時間があるのだろうか
友達、一生懸命働いてください