【问题标题】:Laravel - Driver [] is Not SupportedLaravel - 不支持驱动程序 []
【发布时间】:2018-09-04 23:43:52
【问题描述】:

我还没有找到像我这样的示例,其他示例似乎缺少我已有的内容,但无论如何,我正在尝试上传到外部 FTP 站点,我的 filesystem.php 文件中有以下内容:

    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET'),
    ],

     'fourkites-ftp' => [
        'driver' => 'ftp',
        'host' => 'ftp.site.com',
        'username' => 'my-username',
        'password' => 'my-password',

    ],

我正在尝试在我的一个控制器中发送文件以及以下内容:

  Storage::disk('fourkites-ftp')->put('new/afnloads.csv', $temp);

当我尝试测试它时,它给了我这个错误:

(1/1) InvalidArgumentException 
Driver [] is not supported.
in FilesystemManager.php line 126

有什么建议吗?谢谢!

【问题讨论】:

  • 你能包含更多的配置吗?数组中最后一个, 后面是什么?
  • 你的配置缓存了吗?
  • 你重启工匠发球了吗?

标签: php laravel laravel-5 ftp


【解决方案1】:

很可能配置缓存。 尝试清除使用

php artisan config:clear

【讨论】:

    【解决方案2】:

    我已经通过以下命令解决了我的问题

    php artisan cache:clear

    php artisan config:clear

    php artisan clear-compiled

    【讨论】:

    • 非常简单但非常有用!!非常感谢分享
    【解决方案3】:

    它帮助我将此行添加到 bootstrap/app.php(在“创建应用程序”部分)

    $app->configure('filesystems');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-29
      • 2016-09-09
      • 2018-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多