Php read file contents of network share file

后端 未结 2 2062
情深已故
情深已故 2020-12-01 17:45

I\'m looking for a way to read the file contents of a file located on a network share. I can use the IP Address of the share host and the share folder to get to the locatio

2条回答
  •  孤街浪徒
    2020-12-01 18:06

    According to PHP Filesystem manual UNC/SMB files should be accessible. Try the following:

    \\server\share\file.txt
    

    It may be one of those cases where the // may be mistook as a reference to the root directory. And given this is an SMB path, I would use the traditional backslashes.

提交回复
热议问题