PHP cannot access network shared files

Source: Internet
Author: User
When PHP accesses the shared file on another computer (windows7) in the LAN: file_get_contents (& #039; \ 192.168.1.99 \ log $ \ log.txt & #039;), it prompts that the access is denied, but it can be accessed directly in the resource manager. However, another computer can access it through PHP. Php version 5.4.18... PHP accesses the shared file on another computer (windows7) in the LAN: file_get_contents ('\\\\ 192.168.1.99 \ log $ \ log.txt'), prompting that the access is denied, but it can be accessed directly in the resource manager. However, another computer can access it through PHP.
Php version 5.4.18

The same applies to network ing. PHP cannot be accessed and can be accessed directly in the resource manager.

Message: file_get_contents (\ 192.168.1.99 \ callLog $ \ 20130128.txt) [function. file-get-contents]: failed to open stream: Permission denied

Reply content:

PHP accesses the shared file on another computer (windows7) in the LAN: file_get_contents ('\\\\ 192.168.1.99 \ log $ \ log.txt'), prompting that the access is denied, but it can be accessed directly in the resource manager. However, another computer can access it through PHP.
Php version 5.4.18

The same applies to network ing. PHP cannot be accessed and can be accessed directly in the resource manager.

Message: file_get_contents (\ 192.168.1.99 \ callLog $ \ 20130128.txt) [function. file-get-contents]: failed to open stream: Permission denied

Directly access @ file_get_contents ($ filename );
$ Filename = 192.168.1.99/log/log.txt

Yes.

Prompt Permission denied, Permission problem, the landlord said another computer php can access, then check whether the running script Permission can access that shared resource.

It has been solved. You can do a network ing and then access the source address, but you cannot access the mapped path. I don't know why.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.