簡體   English   中英

將字符串放入ssh2_exec

[英]putting strings in ssh2_exec

我在ssh2_exec中遇到麻煩,將字符串放入了execute中。

$stream = ssh2_exec($connection, 'userad '. $user. ' -p  '. $password);
doesnt work



$stream = ssh2_exec($connection, 'userad  user -p  password');
works

我要做的就是解決這個問題;

$command = 'useradd ' .$user. ' -p '. $password;
$stream = ssh2_exec($connection, $command);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM