1

当我使用 php 函数 ssh2_exec() 时,存档的所有内容都没有解压缩

我的 ziparchive 中大约有 10 个文件和 5 个文件夹,系统解压缩有时只解压缩 3 个文件,而另一次系统解压缩 1 个文件夹和 3 个文件....

我的代码:

$host_ssh = 'ssh.something';
$identifiant = 'username';
$mdp = 'xyzyoupi';

$connection = ssh2_connect($host_ssh , 22);
ssh2_auth_password($connection,$identifiant,$mdp);

if(ssh2_exec($connection, 'unzip -o dirRoot/filename.zip')){
    echo 'unzip ok<br>';
}else{
    echo 'unzip not ok<br>';
}

我正在使用 php7.2

4

0 回答 0