Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Define the parameters for the shell command
- $location = "\\servername\sharename";
- $user = "USERNAME";
- $pass = "PASSWORD";
- $letter = "Z";
- // Map the drive
- system("net use ".$letter.": \"".$location."\" ".$pass." /user:".$user." /persistent:no>nul 2>&1");
- // Open the directory
- $dir = opendir($letter.":/an/example/path")
- ...
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement