如何从网页向客户端硬盘写入文本或xml格式的一些信息 [英] How would I Write to the client harddisk some information in text or xml format from a web page

查看:132
本文介绍了如何从网页向客户端硬盘写入文本或xml格式的一些信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的公司开发了一个内部网的网站。这个网站向工作人员发放工具。



。我的要求是,当任何一个工具出现问题时,该记录也应保存在客户端PC上以及文本或xml中。



格式。



我找不到任何可以访问客户端硬盘的代码。可以任何身体



解决这个问题。

解决方案

这是不允许的,这是出于安全考虑。如果任何 Web App 将操纵文件系统,那么它将对计算机构成风险,因为它可能会对计算机造成伤害。



所以,简单地说,不要这样做。用户应该优先选择文件夹,他/她可以保存文件。


Web应用程序无法访问客户端的计算机。如果您偶尔访问的某个网站可以写入您的硬盘驱动器,无论开发人员想要什么,您会感觉良好吗? (正如Richard MacCutchan正确指出的那样,其他饼干,但饼干本质上是无害的,这个功能是标准的。)



但是,原则上,浏览器中使用的ActiveX模块可以实现这些功能。这基本上就是IE的东西。并非所有浏览器都支持所有系统。更重要的是,这完全不安全。一些安全安全用户永远不会回到您的网站,因为他们发现您正在使用类似的东西。在某些领域,虽然使用了这种技术。例如:1)在内部网中,IT部门真的很糟糕; 2)硬件供应商提供此类应用程序以支持远程硬件,但这是在用户同意的情况下完成的;用户同意下载基于ActiveX的软件。



不要做恶。



-SA

I have developed a web site for my company for intranet. This site issues tools to

the working personnel. My requirement is that when ever one tool is issues to any

person, the record should also be saved on the client PC as well in text or xml

format.

I am unable to find any code that could access the client hard disk. can any body

solve this problem.

解决方案

This is not allowed and it is for security reasons. If any Web App will manipulate the File System, then it will be risk to computer as it can do harm to computer if possible.

So, simply, don't do this. User should get the preference of choosing the folder, where he/she can save the file.


Web applications do not have access to the clients' computer. Would you feel fine if some site you may occasionally visit could write to your hard drive whatever their developers wanted? (As Richard MacCutchan correctly pointed out, "other then cookies", but the cookies are harmless by their nature and this feature is standard.)

However, in principle, such things are possible with ActiveX modules used in browser. This is basically the IE stuff. Not all browsers will support it in all systems. More importantly, this is utterly unsafe. Some security safety users will never come back to your site is they find out you are using something like that. In certain areas such techniques are used though. For example: 1) in intranet of the companies which have really bad IT; 2) hardware vendors offers such applications for remote hardware support, but this is done on user's consent; the user agree to download ActiveX-based software.

"Don't do evil".

—SA


这篇关于如何从网页向客户端硬盘写入文本或xml格式的一些信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆