页面中直接显示FTP中的图片浏览器
FTP根目录下有一张图片,以下spa
第一步:blog
经过以下格式,在浏览器上输入路径,肯定可看到图片图片
ftp://root:root@127.0.0.1/111.png
ftp://FTP用户名:FTP密码@IP地址/FTP目录下图片名
第二步:iframe
在JSP或HTML页面代码上,展现ftp图片class
第一种方法:经过img标签的src展现ftp图片ftp
<div id="images" > <img alt="过车抓拍" src="ftp://root:root@127.0.0.1/111.png"/> </div>
推荐这种方法,能够方便显示图片,在IE浏览器下能够,在谷歌浏览器会直接下载图片,据说是谷歌浏览器版本问题,不知道下载
有时候第一种方法好使,有时候图片不显示,那就是用第二种方法scroll
第二种方法:经过iframe标签的src展现ftp图片密码
<div id="images" >
<iframe style="width:100px;height:100px;" src="ftp://root:root@127.0.0.1/111.jpg" scrolling="no" frameborder="no" border="0" marginwidth="0" marginheight="0"></iframe>
<iframe style="width:100px;height:100px;" src="ftp://root:root@127.0.0.1/111.jpg" scrolling="no" frameborder="no" border="0" marginwidth="0" marginheight="0"></iframe>
</div>
实在不行,只能先获取图片的流,再显示了,网上有例子,没试过这种方法