访问Windows共享使用PHP [英] Accessing a Windows Share using PHP

查看:290
本文介绍了访问Windows共享使用PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用PHP来访问Windows共享一个Excel文件,但似乎跑成什么样子了身份验证问题。

I need to access an Excel file on a Windows Share using PHP but seem to be running into what looks like an authentication issue.

我使用 PHP-ExcelReader 来打开并阅读该文件。工程罚款我的本地计算机上,但我把它放在服务器没有权限访问此共享,所以它告诉我,路径是不可读!

I'm using PHP-ExcelReader to open and read the file. Works fine on my local machine but the server I'm putting it on doesn't have the rights to access this share, and so its telling me that the path is unreadable!

我甚至不知道我对访问该共享的路径是正确的:

I'm not even sure the path I have for accessing this share is correct:

    $file_to_include = "\\\\10.9.8.7\depts$\ExcelFile.xls";

但它的作品在我的机器上,正如我说的,所以我很高兴。

But it works on my machine, as I said so I'm happy with that.

有什么办法,我可以在这里的某个地方加我的凭据?

Is there any way I can add my credentials in here somewhere?

推荐答案

路径\\\\ 10.9.8.7 \\科指南$ \\ ExcelFile.xls应该是本地访问,因为PHP没有中小企业的支持。

Path \\10.9.8.7\depts$\ExcelFile.xls should be locally accessible, since PHP has no smb support.

编辑:至少不是本身,尝试 smb4php

At least not natively, try smb4php

这篇关于访问Windows共享使用PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆