標籤:調試 sse top use term win7 appdata one 本地
【問題】
在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 協議