2016-04-27 10 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?

Antwort

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, vielen Dank für Ihren Kommentar. Wenn ich das http: // entferne, öffnet es überhaupt keinen Link, indem ich es drücke. Klicken Sie nur mit der rechten Maustaste, kopieren Sie den Link und fügen Sie ihn in den Browser ein. –

+0

Ja, Datei: ///. Funktioniert nicht. Der Link ist korrekt, aber es gibt keine Möglichkeit, ihn zu öffnen. –

+0

@ inno.vlad Probieren Sie es mit 5 Schrägstrichen aus oder lesen Sie einfach die Frage durch, die Quentin als Duplikat markiert hat. – BenM