//ipad 处理
public function getIpad(){
$plist = $_FILES['upFile'];
$path = 'upload/';
$homeId = $_SESSION['homeId'];
$newName = time()."_".$homeId.'.xml';
$path = $path.$newName;
$res = move_uploaded_file($_FILES["upFile"]["tmp_name"],$path);
//上传xml文件成功
if($res){
$data = file_get_contents($path);
$plist = new CFPropertyList();
$plist ->parse($data);
$vs = $plist->toArray() ;
$params["appName"] = $vs['CFBundleDisplayName'];
$params["version"] = $vs['CFBundleVersion'];
$iconimg = '';
//图片名称
//获取对应的图片信息
$ico = $vs['CFBundleIconFiles'];
if(isset($ico)){
$icoke = end($ico);
$iconimg = $icoke;
}
$ico = $vs['CFBundlePrimaryIcon']['CFBundleIconFiles'];
if(isset($ico)){
$icoke = end($ico);
$iconimg = $icoke;
}
$ico = $vs['CFBundleIcons']['CFBundlePrimaryIcon']['CFBundleIconFiles'];
if(isset($ico)){
$icoke = end($ico);
$iconimg = $icoke;
}
$params["icon"] = $iconimg;
if(!empty($params)){
unlink($path);
}
return json_encode($params);
}
}