PHP in the file download, which should add some header information:
Header ("Content-type:application/octet-stream");
Header ("Accept-ranges:bytes");
Header ("Accept-length:". $fileSize);
Header ("content-disposition:attachment; Filename= ". $fileName);
I have added header ("Accept-length:". $fileSize); This sentence, but still appear as the following picture, get not to download the size of the file, although not affect the normal function, but in order to pursue perfection, I want to explore the truth.
Look up the manual, search data, finally found header ("accept-length:***"); this is actually a misleading, I really do not understand why the Internet is accept-length. Degary blog tells you, in fact, the correct should be header ("
content-length:* * *"); After the modification, sure enough, the effect of the following figure.
After changing the accept-length to Content-length, you can finally identify the size of the download file.