本地硬盘你可以用js或vbs实现

解决方案 »

  1.   

    "本地硬盘上的目录结构"?? 你指的客户端还是服务器端?如果是客户端,你还可以用JS+FSO的方法,如果是服务器端,Create a File object for the directory, for example, ...File dir = new File(directory_name);and use list() to get the files within it.String[] files = dir.list();Then create a File for each of these 'files' and use isFile() or isDirectory() to check what type each is and....
      

  2.   

    to saucer:
    我不明白你所指的客户端和服务器端的概念,如果是用fso,那么肯定是只能在服务器端的,因为fso是服务器端的一个com组件,如果是客户端的,就已经属于一种黑客行为,属于入侵。。我说的本地就是指web服务器本地。按照你后面的说法,如果是服务器端,用了file类型的一个变量dir来做list,那么首先这是java代码,应该是放到javabean里面的。就是我说的javabean+jsp+js的方式实现的。如果你的意思是把这个代码放到jsp中,也是未尝不可的。不知道还有什么实现方法么?
      

  3.   

    when people say "本地" (local), it normally refers to the client side machine. You can use FSO on the client machine, as long as the ActiveX security settings are low enough on the client machine, not necessarily 黑客行为