In a php script, how do I change the working directory to a network drive?
At work I have a web page running on a windows7 pc using WAMPServer. I'm logged into that computer as me, and I have full access to the shared network drive (windows 2003). The pc where I'm accessing the web page is also windows7 and I'm logged in as me.
If I use chdir() and go up or down from the directory where the web page is running, it works fine. But if I enter a network drive, such as \\dev_server\folder_name, it throws errors. PHP is not installed on \\dev_server, nor is it installed on the pc where I'm accessing the web page.
I echo'ed the directory and then copied it into an explorer window and the correct directory comes up (so no typos).
If I use chdir(), I get the error message, "failed to open dir: No such file or directory". If I use opendir(), I additionally get the error message, "Access is denied. (code: 5)". If I use is_dir(), it returns false.
I found a similar question on Stack Exchange (which was not answered) that suggested the use of exec() but that did not work either - although I might not be using it correctly; I tried various versions of exec("pushd \\dev_server\folder_name"); including using variables, exec($action.$path);, with and without double quotes, etc. If I open a command line on either windows7 pc, I can pushd to the network directory just fine.
What the heck am I doing wrong?
By the way, I'm a php newbie (my background is in database development).