Accessing a Windows Share using PHP

浪尽此生 提交于 2019-11-28 12:35:51
Cem Kalyoncu

Path \\10.9.8.7\depts$\ExcelFile.xls must be locally accessible to the client, since PHP has no SMB support.

EDIT: At least not natively, try smb4php

Your path is correct.

One thing you could try is to share the drive on the server, then map the shared drive on each users computer (make sure they are all the same drive letter, or name), or just your computer. If it's not too many, the users computers would be better, in case you're out, or forget to authenticate. This way, when the user authenticates, it opens the drive up. You can then call the drive via something like:

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