raphael75 Posted April 1, 2014 Share Posted April 1, 2014 I have this code to map two network drives: <?php $cmd = 'net use t: \\comp1\folder /u:dom\user pwd'; $cmd .= 'net use u: \\comp2\folder /u:dom\user pwd'; exec($cmd, $out, $ret); ?> When exec() runs I get this: System error 67 has occurred.The network name cannot be found. and $ret echos 2 I've done some research but I can't figure out what is causing System error 67. Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Solution raphael75 Posted April 1, 2014 Author Solution Share Posted April 1, 2014 Figured it out - gotta escape the double \'s <?php $cmd = 'net use t: \\\\comp1\folder /u:dom\user pwd'; $cmd .= 'net use u: \\\\comp2\folder /u:dom\user pwd'; exec($cmd, $out, $ret); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.