1. 其实我现在使用的就是一个比较完整的。代码见下:
2. 由于需要在两天之内写出来(the whole site),代码很不漂亮,也没有 err handle, optimize.
3. filesystemobject 只能用绝对路径。所以需要 mappath method.
4. Microsoft suminfo object 只支持本地文件,不能 net use...
5. 但是他有 c++ 的源代码,你可以...
6. 很抱歉没办法把整个站点和大家共享,因为在Intranet.
7. 为了对大家负责,我又看了一遍这段半年前的代码,好烂。 :-)
凑和用 8。 :-)
=================================
<%@ Language=VBScript %>
<%
' *********************************************************
' this file is written by
' kw copyright reserved. :-)
' if you have any question, directly contact w/ me.
' some features are just under construction...
' *********************************************************
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<LINK REL="stylesheet" TYPE="text/CSS" HREF=../../"/CSS/myCSS.CSS">
</HEAD>
<BODY>
<SCRIPT LANGUAGE=javascript>
<!--
function mousemove()
{
var srcElement;
srcElement=window.event.srcElement;
{
srcElement.className = "coolstyle";
}
}
function mouseout()
{
var srcElement;
srcElement=window.event.srcElement;
{
srcElement.className = "normalstyle";
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE=vbscript RUNAT = Server>
' Virtual Root
FileServerName = "fileserver"
VRoot = "/file"
' Get the files collection from current folder
dim fs, f, f1, fc, s
set fs = createobject("scripting.filesystemobject")
' begin of function - to get path info from external
' get Path parameter from external
sPath = Request("sPath")
if (sPath = "" or sPath = ".") then
sPath = "."
Response.Write "<TABLE class = tablefilename border=0 width='100%'>"
Response.Write "<TR align=center>"
sHelloString = "Hi, guy, i didn't get correct path info, so I can only show you current folder"
Response.Write "<TD>" & sHelloString & "</TD></TR></TABLE>"
end if
' merge Absolute path
sAbPath = server.MapPath (".") & "/" & sPath
set f = fs.GetFolder (sAbPath)
' end of function - to get path info from external
set fc = f.files
' Create suminfo object
dim suminfo
set SumInfo = Server.CreateObject("II