我正在使用 ssh2_exec 函数 php 为什么它不传递超过 3 个参数?

Im using ssh2_exec functionin php why it doesn't pass more then 3 parameters?

为什么 ssh2_exec 函数传递的参数不超过三个?

$stream_1 = ssh2_exec($ssh, "/root/Script/Auto_Traces/show_ng_trace.sh $a $b $c $d $e");

这种情况只有$a$b$c通过,$d$e不通过,请问如何解决?

我怀疑前 3 个变量中的某些变量中有空格,因此它们被视为多个参数。然后忽略最后 2 个参数。 如果任何变量中有空格(或其他特殊字符),您应该转义它们。

$ae = escapeshellarg($a);
$be = escapeshellarg($b);
// repeat for the rest of variables
$stream_1 = ssh2_exec($ssh, "/root/Script/Auto_Traces/show_ng_trace.sh $ae $be $ce $de $ee");