php上传apk,ipa解析问题

public function Geticon()

{

$img = $_FILES;

$time = date("Y-m-d").'/';

$path1 = 'Public/icon/'.$time;

if(!file_exists($path1)){

mkdir($path1,0777,true);

}

$homeId = $_SESSION['homeId'];

$newName = time()."_".$homeId.'.png';

$path = $path1.$newName;

$res = move_uploaded_file($_FILES["upFile"]["tmp_name"],$path);

$imagepath = $time.$newName;

$sys = $_POST['sys'];

if($sys == 'ios'){

require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/pngCompote.php");

$filename = $path;

$newfileName = $path1.time()."_".$homeId.'a.png';

//如果加了密,,草解密不了,狗曰的

$png = new \PngFile($filename);

if ($png->isIphone) {

$png->revertIphone($newfileName);

$imagepath = $newfileName;

}

}

$params["icon"] = 'iconimg';

$params['res'] = $res;

$params['path'] = $imagepath;

$params['path1'] = $iconres;

echo json_encode($params);

}

你可能感兴趣的:(php上传apk,ipa解析问题)