Open filerun opened 6 years ago
Nevermind. After having a look at the code I realized I can set a default context:
$default = stream_context_set_default([ 'smb' => [ 'username' => '******', 'password' => '******' ] ]);
Thank you for a very useful tool!
Well, disappointed because the wrapper doesn't cover some basic functions, such as "is_dir" or "file_exists", so it's too limited.
It would be fantastic if one could initialize the state using "smbclient_state_init" then continue to use the stream wrapper, so that regular file management functions can be used, while authenticated, but not including the username and password in the used paths/URLs.