安卓APK格式怎么截图? 现在做个上传APK格式功能 , 想在APK上传到服务器之后将APK截图并返回到游览器 有知道怎么实现的吗 参考http://dev.appchina.com/et/dev/upload_up.action 这网站就有这个功能 怎么搞的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 运行apk是要jdk androidsdk环境的,就算把apk作为zip包处理,能不能获取里面的缩略图也另说呢,为什么不在上传apk时同时上传一个缩略图呢 找到方法了 查了下资料 原来APK实际上是ZIP压缩包格式 这就好办了 可以直接读取里面的资源文件 附上临时代码.-----------$zip_file = dirReplace(BF_ROOT . '/upload/tmp/' .self::$LoginObject->rtnUserInfo('userid') . '/pik/' . $this->get('no')); $icon_file = dirReplace(BF_ROOT . '/upload/tmp/' .self::$LoginObject->rtnUserInfo('userid') . '/pik/icon.png'); //------- $zip = zip_open($zip_file); if ($zip) { while ($zip_entry = zip_read($zip)) { $file_name=zip_entry_name($zip_entry); if(str_exists($file_name, 'drawable-xhdpi/icon.png')) if (zip_entry_open($zip, $zip_entry, "r")) { /* read binary stream */ $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); /* create temporary bmpImg */ if($fp = fopen($icon_file,'w')) { if(fwrite($fp,$buf)) { fclose($fp); } } zip_entry_close($zip_entry); } } zip_close($zip); } echo file_get_contents($icon_file); 刚学php,写个程序,中间遇到了点问题,请教下大家 mysql语句中的冒号是什么意思? mysql 最新的稳定版是多少? 数据库ID无法递增 正在页面上输入时,页面跳转的问题,在线等 这样的循环语句应该如何写? 类访问数据库出错? MySQL里面的text字段,显示的有问题! 如何用copy函数将服务器文件复制到本地 binary属性是干嘛的? PHP 伪静态路径问题 Warning: set_time_limit() has been disabled for security reasons in /home/www/we
$zip_file = dirReplace(BF_ROOT . '/upload/tmp/' .self::$LoginObject->rtnUserInfo('userid') . '/pik/' . $this->get('no'));
$icon_file = dirReplace(BF_ROOT . '/upload/tmp/' .self::$LoginObject->rtnUserInfo('userid') . '/pik/icon.png');
//-------
$zip = zip_open($zip_file);
if ($zip) {
while ($zip_entry = zip_read($zip)) {
$file_name=zip_entry_name($zip_entry);
if(str_exists($file_name, 'drawable-xhdpi/icon.png'))
if (zip_entry_open($zip, $zip_entry, "r")) {
/* read binary stream */
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
/* create temporary bmpImg */
if($fp = fopen($icon_file,'w'))
{
if(fwrite($fp,$buf))
{
fclose($fp);
}
}
zip_entry_close($zip_entry);
}
}
zip_close($zip);
}
echo file_get_contents($icon_file);