的Laravel文檔(https://laravel.com/docs/5.2/filesystem#storing-files)狀態這樣的:Laravel - 傳遞一個PHP資源存儲::把
Storing Files
The put method may be used to store a file on disk. You may also pass a PHP resource to the put method, which will use Flysystem's underlying stream support. Using streams is greatly recommended when dealing with large files:
Storage::put('file.jpg', $contents);
Storage::put('file.jpg', $resource);
我期待保存文件比我的PHP內存限制(512MB)大,所以當我做到這一點,我得到一個內存錯誤:
FatalErrorException in Local.php line 128: Allowed memory size of 536870912 bytes exhausted (tried to allocate 377028088 bytes).
如何使用文檔中指出的流功能?我如何從文件路徑轉到「PHP資源」?
真的很酷,並保存我從文件流 – Michael