【问题标题】:Laravel storage ftp disconnectLaravel 存储 ftp 断开连接
【发布时间】:2017-05-19 05:19:29
【问题描述】:

有没有办法在 ftp 适配器(存储库)上调用 disconnect()(在 flysystem 中存在此函数,https://github.com/thephpleague/flysystem/blob/master/src/Adapter/Ftp.php#L189)函数?

我会这样做:

$ftp = Storage::disk('ftp');
$ftp->makeDirectory('test');
$ftp->disconnect(); // this does not work...

有人有想法吗?

【问题讨论】:

    标签: php laravel ftp storage thephpleague


    【解决方案1】:

    如果你想调用disconnect() 方法,你应该能够:

    $ftp->getDriver()->getAdapter()->disconnect();
    

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-02-18
      • 1970-01-01
      • 2012-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-25
      相关资源
      最近更新 更多