无法打开文件夹中的文件 [英] Can't open a file in a folder
本文介绍了无法打开文件夹中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用下面的代码,
Using the code below,
<pre lang="text">
string s = "window.open('file:////sharedFolder//Upload_Files//Design.vsd', 'popup_window', 'width=900,height=600,left=100,top=100,resizable=yes');";
ClientScript.RegisterStartupScript(this.GetType(), "script", s, true);
<pre lang="c#">
我得到了
I got
can't find "...//sharedFolder/Upload_Files/Design.vsd. Make sure the path of internet address is corrct.
文件确实存在于定义的文件夹中。
什么是你的代码有错吗?谢谢
我尝试了什么:
尝试但无法打开文件夹
The file does exist in the folder defined.
What's wrong in y code? Thanks
What I have tried:
Tried but Can't open a file in a folder
推荐答案
URI格式不正确。请参阅:https://en.wikipedia.org/wiki/Uniform_Resource_Identifier [ ^ ]。
当你有四个'/'时没有任何情况。
此外,请确保您的文件位于根目录设置下通常,Web应用程序在沙盒环境中执行,不允许访问此目录之外的任何文件。
也许你最好的选择是使用相对路径名,不使用URI方案。
-SA
URI format in incorrect. Please see: https://en.wikipedia.org/wiki/Uniform_Resource_Identifier[^].
There are no cases when you have four '/'.
Besides, make sure your file is located under the root directory set up for your site. Normally, a Web application is executed in a sandboxed environment which won't allow access to any files beyond this directory.
Perhaps your best bet is to use relative path name, without URI scheme.
—SA
这篇关于无法打开文件夹中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文