php - 有没有办法将浏览器重定向到本地网络上的文件?

标签 php

我想知道是否可以重定向到如下 URL:

\\central\public\blah\test.html

在 PHP 中?我们希望在网站上放置一个链接,以便员工快速访问出于安全原因必须保留在本地网络上的工具。基本上,该链接只有在您在办公室时才有效。

我试过使用:

header("location: \\central\public\blah\test.html"); 

但它只是将 URL 格式化为 http://

最佳答案

尝试足够多的正斜杠和 file://协议(protocol):

file://///central/public/blah/test.html

(引用:http://forums.mozillazine.org/viewtopic.php?f=38&t=908015)

关于php - 有没有办法将浏览器重定向到本地网络上的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7052226/

相关文章:

php - 在mysql while函数中指定序列号

javascript - jQuery 绑定(bind) - 如何将此 Ajax 调用的结果绑定(bind)到文档?

php - 为什么这个函数返回 "undefined"?

php - 使用 mysql 查询不等于

php - heredoc 语句的问题

php - 如何在 PHP 中向对象添加方法?

php - 打印网页时如何去除页眉和页脚信息

php - 自动维护/"We will be back"页

javascript - vue.js 条件渲染中的数组子项

php - fatal error : Can't use function return value in write context in [filter_input]