How to operate a network drive in PHP

Source: Internet
Author: User
How to operate a network drive in PHP & lt ;? $ Path = "\\\\ cdi-test2 \ users \"; echo & nbsp; $ path; $ dir = scandir ($ path); print_r ($ dir );? & Gt; error \ cdi-test2 \ users \ Warning: & nbsp; scan methods for operating the network drive in PHP
$ Path = "\\\\ cdi-test2 \ users \\";
Echo $ path;
$ Dir = scandir ($ path );
Print_r ($ dir );
?>

Error
\ Cdi-test2 \ users \
Warning: scandir (\ cdi-test2 \ users \) [function. scandir]: failed to open dir: No such file or directory in E: \ MYOA \ webroot \ 33.php on line 13

Warning: scandir () [function. scandir]: (errno 2): No such file or directory in E: \ MYOA \ webroot \ 33.php on line 13

How can I access the mapped network drive.
------ Solution --------------------
You need to map the network drive to a local device, and then use php to operate
------ Solution --------------------
ING is acceptable, unless you do not have the permission to access X: \
------ Solution --------------------
Why do we have to use PHP to operate the machine subsystem? PHP is only suitable for websites and data reading and deletion.

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.