回複: kw,你的那個程式不能用絕對路徑?如c:\

來源:互聯網
上載者:User
程式 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("IISSample.SummaryInfo")
    
    ' Which kinds of document should be displayed?
    '
    bDocChecked = Request.Form ("doc")
    bXDocChecked = Request("XDoc")
    
    bPptChecked = Request.Form ("ppt")
    bXPptChecked = Request("XPpt")
    
    bXlsChecked = Request.Form ("xls")
    bXXlsChecked = Request("XXls")
    
    bTxtChecked = Request.Form ("txt")
    bXTxtChecked = Request("XTxt")
    
    bZipChecked = Request.Form ("zip")
    bXZipChecked = Request("XZip")
    
   &nb



相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。