У меня есть файл размером 200 МБ, который я хочу предоставить пользователю через скачивание. Однако, поскольку мы хотим, чтобы пользователь загружал этот файл только один раз, мы делаем это:
echo file_get_contents('http://some.secret.location.com/secretfolder/the_file.tar.gz');
чтобы принудительно загрузить. Однако это означает, что весь файл должен быть загружен в память, что обычно не работает. Как мы можем передать этот файл им, на некоторых килобайтах на кусок?