How to create a link in Wordpress to a file on an local network server

二次信任 提交于 2021-02-08 06:47:49

问题


I installed Wordpress on my station and its now being used internally for corporate blogging. I wanted to know if there is a way to create links to servers in our intranet?

For example to access a server resource in windows I use Run->\server-name\folder\file.txt

How can I create a link to such file in Excel (or generally in HTML) that will be opened by Firefox & IE when clicked in Wordpress.

Thanks,

Roy


回答1:


You can either map the servers to virtual hosts on the web server and create links like you would to any external file on the internet. Or, if you insist, use

<a href="file:///path/to/file.html">file</a>

in your example:

<a href="file:///server-name/folder/file.txt">file</a>



回答2:


After checking this, the right way to mimic a UNC form (at least in my case) was:

<a href="file://///server-name/folder/file.txt">file</a>

which is equal to

\\server-name\folder\file.txt

It works in Firefox (3.6) and IE (8).

We use Windows XP, all stations are in an Active Directory domain, in case it matters.



来源:https://stackoverflow.com/questions/5497169/how-to-create-a-link-in-wordpress-to-a-file-on-an-local-network-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!