2016-04-27 39 views
0

I need to open filelink (network share in local) in the browser.<a href="http://file://///> convert file:// to file// ---remove colon

I use such code:

<a href="http://file://///server/localfolder"> 

It open link in the browser but convert it to such format: file/////server/localfolder (remove colon).

This way browser don't open local folder. I have tried to change file:///// to file:// or file:/// or file://// . But colon stell removed by browser.

How to solve it?

答えて

0

You can't specify more than one protocol definition as part of a URL schema. You shouldn't link to file:// either, really, but if you absolutely must, just remove the http:// definition as follows:

<a href="file:///server/localfolder"> 

You can read more about file: protocol, and in particular its implementation in the following links:

+0

BenM、コメントありがとうございました。私がhttp://を削除すると、それを押してリンクをまったく開けません。右クリックし、リンクをコピーしてブラウザに貼り付けます。 –

+0

はい、file:///動作しません。リンクは正しいが、それを押して開くことはできない。 –

+0

@ inno.vlad 5つのスラッシュで試してみるか、Quentinによって重複していると表示されている質問を読んでください。 – BenM

関連する問題