且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在重要网站上发现的Javascript示例,如果fopen对我不起作用

更新时间:2023-12-02 14:31:16

Javascript没有文件系统访问权限。正如你在第二个链接中提到的那样,
你需要安装特殊的插件才能给JS文件系统访问权。

Javascript has no filesystem access. As it is mentioned in the second link you posted, you will need to install special plugins in order to give JS file system access.

我不知道认为这是完成你想要做的任何事情的正确方法。

I don't think it is the right way to accomplish whatever you are trying to do.

为了访问客户端的文件系统,我见过的流行方式是使用Flash或Java applet或者就此而言是Microsoft Silverlight。

In order to access client's filesystem, the popular way I've seen is using Flash or Java applet or Microsoft Silverlight for that matter.

要访问服务器文件系统,您需要运行具有访问文件系统的适当权限的Web服务器。然后,您可以对Web服务器进行AJAX调用,然后Web服务器将为您提取文件。

For accessing your server filesystem, you will need to run a web server which has proper permissions to access the filesystem. Then, you can make AJAX calls to the web server, which in turn will fetch the file for you.