"file:///" file 协议
【问题】
在WLW中拖入本地图片文件,然后调试过程中,选中对应图片,看到获得的对应的html源码中,图片地址是这样的:
href="file:///C:/Users/CLi/AppData/Local/Temp/WindowsLiveWriter1627300719/supfiles52F410/wangdan-se-436963[2].jpg">
即使一个file加上一个冒号,再跟着三个斜杠的形式。
想要搞懂这种写法的确切含义。
【解决过程】
1.搜“C# file colon three slash”找到这里:
http://bytes.com/topic/html-css/answers/154018-href-file-c-temp-target-_blank-c-temp-does-not-work-ie-anymore
提到了说是file protocol,所以猜测估计是和http和ftp等价的某种file协议。
2.那就是和C#无关,那就去搜“file protocol colon three slash”,然后找到:
http://www.urbandictionary.com/define.php?term=protocol%20section&defid=4118180
解释说:
The file (colon) // (slashes required) URL is good for accessing individual files. It has the ability to access the machine you’re using, or one you’re connected to, just by typing the path, in which you do file (colon) // then another slash (making 3), then in which you type a folder name, another slash, a folder inside that, and so on, until the file name. Hit enter, and the file is accessed.
总之,就是用file:///加上对应文件的地址,打开对应的本地电脑(或者你所连接到的电脑的 ->估计指的是像windows中映射出来其他网络邻居中某个计算机为某个网盘的情况)中对应的文件。
3.试了试,在Win7的资源管理器中,直接输入:
file:///C:/Users/CLi/AppData/Local/Temp/WindowsLiveWriter1627300719/supfiles52F410/wangdan-se-436963[2].jpg
是可以打开此图片的。
【总结】
用file:///+文件的地址,其实就等价于文件的地址,
即:
file:///C:/Users/CLi/AppData/Local/Temp/WindowsLiveWriter1627300719/supfiles52F410/wangdan-se-436963[2].jpg
其实就等价于;
C:/Users/CLi/AppData/Local/Temp/WindowsLiveWriter1627300719/supfiles52F410/wangdan-se-436963[2].jpg
使得(此处Html源码中所允许的地址,对应的WLW程序)可以访问对应的文件而已。
"file:///" file 协议的更多相关文章
- Diagnostics: File file:/tmp/spark-95cbb984-da28-4784-8b99-eb83ad74437f/__spark_libs__1421840316395076250.zip does not exist
搭建spark环境,测试在yarn 上运行spark shell的时候出现的错误:Diagnostics: File file:/tmp/spark-95cbb984-da28-4784-8b99-e ...
- Hive 执行作业时报错 [ Diagnostics: File file:/ *** reduce.xml does not exist FileNotFoundException: File file:/ ]
2019-03-10 本篇文章旨在阐述本人在某一特定情况下遇到 Hive 执行 MapReduce 作业的问题的探索过程与解决方案.不对文章的完全.绝对正确性负责. 解决方案 Hive 的配置文件 ...
- File(File f, String child) File(String parent, String child)
(转载)File(File f, String child) 根据f 抽象路径名和 child 路径名字符串创建一个新 File 实例. f抽象路径名用于表示目录,child 路径名字符串用于表示目录 ...
- Diagnostics: File file:/tmp/spark-***/__spark_libs__***.zip does not exist
Diagnostics: File file:/tmp/spark-c03df206-c90e-4c97-a2d6-a5d3fdb17811/__spark_libs__303213348409500 ...
- File file = new File("路径名") 路径名的2种写法
项目的结构:相同颜色是同级的 bean的配置文件的读取和一般文件的读取有点差别的 public static void getValue(String key){ //传入"time&quo ...
- File file:/data1/hadoop/yarn/local/usercache/hp/appcache/application_* does not exi
AM Container for appattempt_1453292851883_0381_000002 exited with exitCode: -1000For more detailed o ...
- 关于spark入门报错 java.io.FileNotFoundException: File file:/home/dummy/spark_log/file1.txt does not exist
不想看废话的可以直接拉到最底看总结 废话开始: master: master主机存在文件,却报 执行spark-shell语句: ./spark-shell --master spark://ma ...
- “Invalid configuration file. File "I:/My Virtual Machines/Windows XP english Professional/Windows XP Professional.vmx" was created by a VMware product
“Invalid configuration file. File "I:/My Virtual Machines/Windows XP english Professional/Windo ...
- docker启动报错解决及分析(Cannot create container for service *******: cannot mount volume over existing file, file exists /var/lib/docker/overlay2/)
现象: Cannot create container for service *******: cannot mount volume over existing file, file exists ...
- useradd 报Creating mailbox file: File exists
问题描述:增加一个用户时,报下面的错误:[root@master ~]# useradd hadoopuseradd: warning: the home directory already exis ...
随机推荐
- ASP.NET缓存OutputCache和Response.Cache之C#后台设置
一.ASPX页面缓存页面缓存的使用方法非常的简单,只需要在aspx页的顶部加一句声明<%@ OutputCache Duration="60" VaryByParam=&qu ...
- js判断浏览器类型和内核
function judge() { var sUserAgent = navigator.userAgent.toLocaleLowerCase(); var isLinux = (String(n ...
- 最受Web前端开发者欢迎的五大开发工具
工其事,必利于器.好的开发工具毋容置疑会帮助Web前端开发者事半功倍,51CTO在上期主办的技术沙龙<大型网站PHP开发之道> 对现场的百余位Web开发者做了问卷调查,后经51CTO调研小 ...
- Androidstudio下Generate signed apk提示Error: Expected resource of type id [ResourceType]解决办法
只需要在报错位置所在的类上面添加: @SuppressWarnings("ResourceType") 即可实现Generate signed apk.
- dynamic_cast,const_cast,static_cast,reinterpret_cast 详解
如果直接指针直接强转,将只能访问虚函数的内容,而不能访问特定类中的特定成员或方法!!!! 强制类型转换运算符:C++有四种强制类型转换符,分别是dynamic_cast,const_cast,stat ...
- 【CSS】css各种居中方法
水平居中的text-align:center 和 margin:0 auto 这两种方法都是用来水平居中的,前者是针对父元素进行设置而后者则是对子元素.他们起作用的首要条件是子元素必须没有被flo ...
- ubuntu1204上不能正常用emacs配合gocode进行自动补全
我按gocode的页面https://github.com/nsf/gocode上去做,可是还是未成功,,我确认auto-complete在c-mode中是可以使用的,因为有补全出来了, 我再找了ht ...
- HDU 5858 Hard problem
Hard problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Tota ...
- Ubuntu 出现 apt-get问题的解决方法
ubuntu 10.10 sudo apt-get update 404 Not Found or W: Failed to fetch http://cn.old-releases.ubuntu. ...
- bzoj 1458 士兵占领(最大流)
[题意] n行m列,第i行必须放L[i],第j列必须放C[j],有障碍格,求满足条件至少需要放多少. [思路] 至少放多少等价于最多不放多少. 对行列分别建XY点,则连边(S,Xi,a)(Yi,T,b ...