【发布时间】:2018-12-12 21:19:03
【问题描述】:
我在 centos 上运行我的 Laravel 项目,使用默认的 artisan 服务器。 我正在尝试使用 laravel File::append 命令将数据添加到文件中。 在 config/filesystems.php 我有以下内容:
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('data'),
],
和
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'local'),
并且 .env 文件中未定义“FILESYSTEM_DRIVER”。 但是,当我使用 File::append() 时,文件是在公共文件夹中创建的,而不是 storage_path
知道是什么原因造成的吗?我错过了什么。
【问题讨论】: