Please check latest API https://flysystem.thephpleague.com/api/$stream = fopen('/path/to/database.backup', 'r+');$filesystem->writeStream('backups/'.strftime('%G-%m-%d').'.backup', $stream);// Using write you can also directly set the visibility$filesystem->writeStream('backups/'.strftime('%G-%m-%d').'.backup', $stream, [ 'visibility' => AdapterInterface::VISIBILITY_PRIVATE]);if (is_resource($stream)) { fclose($stream);}// Or update a file with stream contents$filesystem->updateStream('backups/'.strftime('%G-%m-%d').'.backup', $stream);// Retrieve a read-stream$stream = $filesystem->readStream('something/is/here.ext');$contents = stream_get_contents($stream);fclose($stream);// Create or overwrite using a stream.$putStream = tmpfile();fwrite($putStream, $contents);rewind($putStream);$filesystem->putStream('somewhere/here.txt', $putStream);if (is_resource($putStream)) { fclose($putStream);} 这篇关于phpleague flysystem读取和写入服务器上的大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-09 01:14