如果您希望公开服务器的目录树,我将通过 Web 服务(JSON、XML 或其他)公开您需要的任何详细信息(目录树和/或文件内容),并将该数据返回给客户端 - 可能使用 AJAX。我想到的一个直接示例是 phpVirtualBox。我可以使用这种方法通过远程 Web 浏览器在服务器上远程安装虚拟磁盘。
如果您希望从 Web 客户端公开目录树,则需要使用浏览器的内置文件选择器(使用 ,或小程序 - 例如 Java 或 Flash(如果浏览器提供的选项未提供您正在寻找的功能)。
What exactly are you trying to do? When you say "open a sandbox URL while using file browse button", I assume you're trying to list available files (and maybe retrieve contents of a file)? If so, are you trying to access the file system of the server (web server?) or the client?
Either way, I think you need to consider some other options.
If you're looking to expose a directory tree of the server, I'd expose any details you need (directory tree and/or file contents) through a web service (JSON, XML, or otherwise) - and present that data back to the client - possibly using AJAX. An immediate example that comes to mind is phpVirtualBox. I can remotely mount virtual disks from the server on the server - all through a remote web browser using this approach.
If you're looking to expose a directory tree from the web client, you either need to use the browser's built-in file selector (using <input type="file"...>, or an applet - e.g. Java or Flash, if the browser-provided options don't provide the functionality that you're looking for.
发布评论
评论(1)
你到底想做什么?当您说“使用文件浏览按钮时打开沙箱 URL”时,我假设您正在尝试列出可用文件(并且可能检索文件的内容)?如果是这样,您是否正在尝试访问服务器(Web 服务器?)或客户端的文件系统?
不管怎样,我认为你需要考虑一些其他的选择。
如果您希望公开服务器的目录树,我将通过 Web 服务(JSON、XML 或其他)公开您需要的任何详细信息(目录树和/或文件内容),并将该数据返回给客户端 - 可能使用 AJAX。我想到的一个直接示例是 phpVirtualBox。我可以使用这种方法通过远程 Web 浏览器在服务器上远程安装虚拟磁盘。
如果您希望从 Web 客户端公开目录树,则需要使用浏览器的内置文件选择器(使用
,或小程序 - 例如 Java 或 Flash(如果浏览器提供的选项未提供您正在寻找的功能)。
What exactly are you trying to do? When you say "open a sandbox URL while using file browse button", I assume you're trying to list available files (and maybe retrieve contents of a file)? If so, are you trying to access the file system of the server (web server?) or the client?
Either way, I think you need to consider some other options.
If you're looking to expose a directory tree of the server, I'd expose any details you need (directory tree and/or file contents) through a web service (JSON, XML, or otherwise) - and present that data back to the client - possibly using AJAX. An immediate example that comes to mind is phpVirtualBox. I can remotely mount virtual disks from the server on the server - all through a remote web browser using this approach.
If you're looking to expose a directory tree from the web client, you either need to use the browser's built-in file selector (using
<input type="file"...>
, or an applet - e.g. Java or Flash, if the browser-provided options don't provide the functionality that you're looking for.