简体   繁体   中英

directory reading in linux using php from windows shared folder on network

I need to read a directory from windows system share folder to PHP script in linux environment But the script displaying error "failed to open dir: No such file or directory"

How can i read the windows shared directory in linux using php?

This has nothing to do specific to PHP IMO if you're okay with mounting the Windows share on the Linux box using the following mount command:

mount -t cifs -o username=WINDOWS_USER_NAME \\\\\\\\hostname\\\\sharename /mnt/myshare

Then you should be able to read the files in the share from /mnt/myshare just like any other file within your PHP script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM