当前位置:网站首页>Streaming a large file using PHP
Streaming a large file using PHP
2022-06-25 06:37:00 【Saffron】
problem :
I have a 200MB file that I want to give to a user via download. I have one 200MB The file of , I want to provide it to users by downloading .However, since we want the user to only download this file once, we are doing this: however , Because we want users to download this file only once , So we do :
echo file_get_contents('http://some.secret.location.com/secretfolder/the_file.tar.gz');to force a download. Compulsory Download .However, this means that the whole file has to be loaded in memory, which usually doesn't work. however , This means that the entire file must be loaded into memory , This usually doesn't work .How can we stream this file to them, at some kb per chunk? How do we take some of each piece kb Stream this file to them at a speed of ?
Solution :
Reference resources : https://stackoom.com/en/question/T0sq边栏推荐
- Usage of STL map
- [no title] dream notes 2022-02-20
- 十大券商公司哪个佣金最低,最安全可靠?有知道的吗
- mysql 表查询json数据
- What is the IP address
- DNS domain name system
- Investment opportunities and operational risk assessment report of China's engineering consulting industry during the 14th Five Year Plan period 2022-2028
- 集群常用群起脚本
- Guess the size of the number
- Grouped uitableview has 20px of extra padding at the bottom
猜你喜欢

百度地图——入门教程

Laravel8+ wechat applet generates QR code

How to realize the stable output of 3.3v/3.6v (1.2-5v) voltage of lithium battery by using the voltage rise and fall chip cs5517

Cannot activate inspection type when SAP retail uses transaction code mm41 to create commodity master data?

After unplugging the network cable, does the original TCP connection still exist?

Comparison test of mono 120W high power class D power amplifier chip cs8683-tpa3116

TCP BBR as rate based

cos(a-b)=cosa*cosb+sina*sinb的推导过程
![[200 opencv routines of youcans] 104 Motion blur degradation model](/img/a9/8841ffc8bd3c486bc4011a1a84ff45.jpg)
[200 opencv routines of youcans] 104 Motion blur degradation model

From file system to distributed file system
随机推荐
VMware virtual machine prompt: the virtual device ide1:0 cannot be connected because there is no corresponding device on the host.
Global and China chemical mechanical polishing abrasive materials market demand outlook and investment scale forecast report 2022 Edition
Acwing2013. three lines
Exercise: completion
Global and China financial guarantee marketing strategy and channel dynamic construction report 2022
cos(a-b)=cosa*cosb+sina*sinb的推导过程
@The difference between notempty, @notnull and @notblank
Derivation of COS (a-b) =cosa*cosb+sina*sinb
Cs8126t 3.1w mono ultra low EMI unfiltered class D audio power amplifier IC
What is VLAN
Research Report on demand and Competitive Prospect of global and Chinese welding personal protective equipment industry 2022-2027
Analysis report on global and Chinese pharmaceutical excipients industry competition and marketing model 2022-2028
Research Report on marketing channel analysis and competitive strategy of China's polycarbonate industry 2022
How to chain multiple different InputStreams into one InputStream
Why can't GC () free memory- Why does gc() not free memory?
How to realize hierarchical management of application and hardware in embedded projects
Your local changes to the following files would be overwritten by merge: .vs/slnx.sqlite
Asemi fast recovery diode us1m parameters, us1m recovery time, us1m voltage drop
Wan Yin revealed that he was rejected by MIT in this way: "the department doesn't like you". He confronted the principal and realized
From file system to distributed file system