My PHP code looks like this:
$dirpath = "\\\\172.16.111.91\\Data";
$dircheck = is_dir($dirpath);
if ($dircheck) {
echo "Found";
} else {
echo "Not Found";
}
If $dirpath is something like "C:/", it works fine, but I've been giving it the UNC path to a remote directory and suddenly it can't find anything.
I've tried exec("NET USE $dirpath $password /USER:$user");
and that doesn't help.
I'm running this on Windows Server 2012 R2, PHP is v5.3, and IIS 8.5. I think this has something to do with IIS's authentication but for the life of me I just can't figure this one out.