thinkphp 6爬坑记录

    技术2022-07-11  76

    为什么用 \think\facade\Filesystem::putFile( ‘topic’, $file);总是多一个storage目录

    问题所在tp6在config文件夹下有一个filesystem.php文件 磁盘路径root,最后的storage去掉就可以解决 // 默认磁盘 'default' => env('filesystem.driver', 'local'), // 磁盘列表 'disks' => [ 'local' => [ 'type' => 'local', 'root' => app()->getRuntimePath() . 'storage', ], 'public' => [ // 磁盘类型 'type' => 'local', // 磁盘路径 'root' => app()->getRootPath() . 'public/storage', // 磁盘路径对应的外部URL路径 'url' => '/storage', // 可见性 'visibility' => 'public', ], // 更多的磁盘配置信息 ],
    Processed: 0.013, SQL: 9