Php encountered a problem downloading the file

when I downloaded the zip file in the background, I wrote the necessary parameters in the header, but still did not appear the download box, but appeared in the return value. Can anyone tell me ~
Sorry, the response of the laravel used to download the code

.

this is my header:


$headers = [
                    "Content-type"=>"application/octet-stream",
                    "Content-Disposition"=>"attachment;filename=".$filename,
                    "Accept-Length"=>filesize($local_path."\\".$filename),
                    "Content-Transfer-Encoding"=>"binary"
                ];
return response()->download($local_path."\\".$filename,$filename,$headers);

the result returned after download,

but the strange thing is that if my computer is installed with Thunderbolt, it will automatically jump to Xunlei and download it. If it is not installed, it will be the result above. What is the reason for this?

Apr.07,2021

you should also post the download code instead of just header

then laravel has a response ()-> download () you can use it directly

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-1e64a11-660da.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-1e64a11-660da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?