如何在互联网网站上显示本地存储的图像?

发布于 2024-07-22 05:35:54 字数 421 浏览 7 评论 0原文

我想在我的网站上显示存储在访问者本地文件系统上的图像。

假设我在访问者驱动器上有图像的位置(例如 c:\Documents And Settings\Ropstah\image.png),那么我是否可以在我的互联网网站(例如 www.website)中显示该图像.com)?

当我使用以下语法(Internet Explorer 7、Firefox 3 等..)时,图像似乎无法加载:

<img src="file://c:\Documents and Settings\Ropstah\image.png" />

如果 .html 文件,则图像 DO 显示(我在 website.com/index.html 上使用)位于我的本地电脑上...

i would like to display images on my website that are stored on a visitors local filesystem.

Assuming I have the location of the image on the visitors drive (e.g. c:\Documents And Settings\Ropstah\image.png), is it then possible for me to display this image in my internet website (e.g. www.website.com)?

The images won't seem to load when i use the following syntax (Internet Explorer 7, Firefox 3 etc..):

<img src="file://c:\Documents and Settings\Ropstah\image.png" />

The images DO display if the .html file (which i use on website.com/index.html) is located on my local pc...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

鹿港巷口少年归 2024-07-29 05:35:54

这听起来像是网络浏览器上的安全设置,可能被设置为阻止访问互联网站点的本地文件系统的级别。

用户可以以特定于每个浏览器的方式编辑安全设置。 例如,对于 IE,它是“工具”->“ 互联网选项 -> 安全

This sounds like security settings on the web browser, which are probably set to a level that prevents local filesystem access for an internet site.

Security settings can be edited by users, in a way specific to each browser. for example for IE it's Tools -> Internet Options -> Security

复古式 2024-07-29 05:35:54

如果用户将您的站点设置为受信任区域,则可以。

You can if the user sets your site to be in the Trusted zone.

小嗷兮 2024-07-29 05:35:54

你不能。

愚蠢的是,这些浏览器决定通过不允许公共网页禁用本地内容来关闭“安全漏洞”。

You can't.

Stupidly, these browsers have decided to close "security holes" by not allowing public web pages to disable local content.

枕头说它不想醒 2024-07-29 05:35:54

使用纯 HTML,您无法访问存储在用户计算机上的文件。 您可以改用 Flash、Java Applet、ActiveX、Silverlight...

Using pure HTML you cannot access files stored on users' computers. You could instead use Flash, Java Applet, ActiveX, Silverlight, ...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文