Php setting the Content-Length browser does not terminate the connection

in terms of online tutorials (for example: http://www.php.cn/php-weiziji.)
use header ("Content-Length: 200"); you can give it a length and stop receiving when it exceeds it, but after I tried, I found that the browser will still download all the content.

Php
Mar.14,2022

there is a problem in that article. The purpose of Content-Length is to solve the problem of requesting to reuse a TCP connection multiple times when a long connection is made. One request is completed by reading only the specified length at a time. This response header needs to be used in conjunction with connection , and it doesn't make sense to add it alone. If you separately set connection to close , this length is useless, because when the connection is closed, the message body is transmitted, so there is no need to specify the length.

the two can only be used together if connection is keep alive .

you can refer to the article https://www.jianshu.com/p/eba..

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c2be-2a838.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c2be-2a838.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?