What if the application file downloaded through PHP cannot run? The website contains an exe file. after downloading the following code, you can find that the file cannot run and even the icon is lost. why?
$ Fs = fopen ($ _ finame, 'r'); $ _ fisize = filesize ($ _ finame); Header ("Content-type: application/octet-stream "); header ("Accept-Ranges: bytes"); Header ("Accept-Length :". $ _ fisize); Header ("Content-Disposition: attachment; filename = ". basename ($ _ finame); $ buffer = 512; while (! Feof ($ fs) {$ _ fidata = fread ($ fs, $ buffer); echo $ _ fidata;} fclose ($ fs );
Online...
Reply to discussion (solution)
It turns out to be placed in a compressed package...
Solve this by yourself ..
It turns out to be placed in a compressed package...
The solution is solved, but I have a lot of problems .. Why is it okay to re-encode the exe file as Mao and put it into rar. However, these issues need to be discussed in a new post... So close the post.