PHP: Mapped Network Drives

Posted by Abs on Stack Overflow See other posts from Stack Overflow or by Abs
Published on 2010-04-07T13:46:14Z Indexed on 2010/04/07 13:53 UTC
Read the original article Hit count: 208

Hello all,

I have mapped a network drive to a computer in my home network. Now I am trying to access it via PHP - I did this quick test:

echo opendir('Z:\\');

This gives me:

Warning: opendir(Z:\) [function.opendir]: failed to open dir: No error in C:\wamp\www\webs\tester-function.php  on line 3

What have I done wrong here?

I don't want my users typing in the UNC path so is there a way to get the UNC path for them and maybe that will work when I try to access it? This is possible in Microsoft languages but I am not sure how to get PHP to do this - maybe using a cmd.exe command?

Please note, the mapped drive does exist as I can see it and I can access it. It also does not appear to be a permissions problem as I am assuming it would of complained about this IF it could access that drive...right?

Thanks all for any help

© Stack Overflow or respective owner

Related posts about php

Related posts about unc-path