This is working in php (network path in net use directly written)
$user_M = 'user';
$password_M = 'password';
exec('net use "\\\10.92.114.102\E$" /user:"'.$user_M.'" "'.$password_M.'" /persistent:no');
opendir($var_set_ip);
But when I define a variable for the path, it is not working for the same netowrk path. Althought path username and password is correct i get error "Warning: opendir(\10.92.114.103\E$): The user name or password is incorrect (code: 1326) in C:\Apache24\htdocs\main.php on line..". How can i define the path correctly as a php variable? I have also tried to use double quotes in exec("..") but also didn't work.
$user_M = 'user';
$password_M = 'password';
exec('net use "'.$path.'" /user:"'.$user_M.'" "'.$password_M.'" /persistent:no');
opendir($var_set_ip);