Answer the question
In order to leave comments, you need to log in
I change the name of the apk file on the fly, but when downloading, it shows that the archive is broken how?
I change the name of the file on the fly when downloading, the size corresponds to the original, but this archive, when installed on the phone, says that "Failed to process the package" with the original there are no problems!
apk format
file The file is located on another server
Code
$file = get_headers($url);
foreach($file as $a){
header($a);
}
header('Content-Disposition: attachment;filename="'.$files->file.'"');
readfile($url);
Answer the question
In order to leave comments, you need to log in
Because the readfile() function is designed to return the file that you have on disk. And you are trying to give something by URL there. In such cases, it is useful to occasionally open the downloaded file with notepad to make sure its contents are correct.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question