Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php ssh2_exec无法正常使用动态变量_Php_Ssh - Fatal编程技术网

Php ssh2_exec无法正常使用动态变量

Php ssh2_exec无法正常使用动态变量,php,ssh,Php,Ssh,我对ssh2_exec有惊人的问题: 此代码运行良好: $stream = ssh2_exec($connection, "smtp-cli --verbose --host=server.com --enable-auth --user=login --pass=password"); 此代码工作不正常: $stream = ssh2_exec($connection, "smtp-cli --verbose --host=".$server." --enable-auth --user="

我对ssh2_exec有惊人的问题:

此代码运行良好:

$stream = ssh2_exec($connection, "smtp-cli --verbose --host=server.com --enable-auth --user=login --pass=password");
此代码工作不正常:

$stream = ssh2_exec($connection, "smtp-cli --verbose --host=".$server." --enable-auth --user=".$login." --pass=".$password);
我哪里错了

需要修剪变量,很抱歉出现这个问题: