flysystem: the method of read() in ftp not worked, File not found at path:xxx file
My laravel vision is 5.2.*:in my config/flysystem.php ,here are configs:
'disks' => [
'ftp' => [
'driver' => 'ftp',
'host' => 'myhost',
'port' => 21,
'username' => 'myusename',
'password' => 'mypassword',
'root' => '/',
],
],
and my route is here:
Route::get('/flysystem', function () {
Storage::disk('ftp')->put('hi.txt', 'Contents test');
echo Storage::disk('ftp')->read('hi.txt');
});
it is error and output “FileNotFoundException in Filesystem.php line 381: File not found at path: hi.txt”; My English is very bad ,please help me! thank you.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (6 by maintainers)
If I try to read the file with complete path there is no problem. But when I loop by foreach, it can not read some certain files.