Php custom apk installation package example this article describes how to use the php custom apk installation package for your reference. The specific implementation method is as follows: & lt ;? Phpsource file $apk"=gb.apk & quot; generate temporary file $ filetempnam (& quot; tmp & quot;, & quot; zip & quot;); copy file if (false php custom apk installation package instance
This article describes how to use the php custom apk installation package for your reference. The specific implementation method is as follows:
Open ($ file); // add a file // only files in this directory can be modified due to apk limitation, otherwise, an invalid apk package $ zip-> addFromString ('meta-INF/extends. json', json_encode (array ('autor' => 'demo'); // close zip $ zip-> close (); // download the file header ("Content-Type: application/zip"); header ("Content-Length :". filesize ($ file); header ("Content-Disposition: attachment; filename = \" {$ apk} \ ""); // output binary stream readfile ($ file ); // delete the temporary file unlink ($ file);?>