1

My client wants to add a link to a webpage. When the link is clicked, Windows Explorer will open and go to an FTP site (e.g., ftp://ftp.domain.com/). I tried the following HTML

<a href="ftp://ftp.domain.com/">ftp://ftp.domain.com/</a>

Unfortunately, this will open the FTP site in the web browser which supports downloading only but not uploading.

I prefer a cross-browser solution, but an IE-only solution would be fine as well.

4

2 回答 2

0

如果您希望能够上传指定具有写入权限的凭据:

<a href="ftp://username:password@ftp.domain.com/">ftp://ftp.domain.com/</a>

但我不确定 IE 是否接受这一点。

于 2010-08-02T01:35:12.143 回答
0

您确定匿名用户实际上可以上传文件吗?
您可以使用以下方法提供用户名/密码组合:

<a href="ftp://username:password@domain.com">

如果失败了,除了编写基于 Web 的 FTP 客户端外,您无能为力。

编辑: AFAIK 什么程序用于打开协议(在这种情况下为 FTP)由浏览器定义,这是您无法更改的。

于 2010-08-02T01:35:17.937 回答