首页 > TOT的上传文件失败

TOT的上传文件失败

TOT 是个好东西啊,不过还不会用 ><.

按照github上的说明,部署好后,上传ipa,结果是:"File is not an ipa"

代码里面是这句话来判断的:

if   (( $_FILES["file"]["type"] != "application/octet-stream"))

我不会php,照这摸样,尝试把$_FILES["file"]["type"] 打出来,但是没有任何结果,是空的。

ipa的制作我采用了两种方式,都是不行的:
第一种.archive打包 -- > show in Finder --> 显示包内容 --> Products --> Application, 把那个没有后缀的文件扔到itunes里,然后选中itunes里的应用,右键 --》 在Finder中显示,就是ipa包了。
第二种.按照教程里的方式

我使用的是xcode4.5

求大侠指导><...


if (($_FILES["file"]["type"] != "application/octet-stream"))//file is not an ipa
{
echo "File is not an ipa\n";
}
else if ($_FILES["file"]["size"] > 1024 * 1024 * 800)//ipa file size limit to 800M

改为

// if (($_FILES["file"]["type"] != "application/octet-stream"))//file is not an ipa
// {
// 	echo "File is not an ipa\n";
// }
// else 
if ($_FILES["file"]["size"] > 1024 * 1024 * 800)//ipa file size limit to 800M
{
echo "File should not be larger than 800M\n";
}

也就是说把第一个判断注释掉

Oct 28, 2012修改:
可能是服务器有附件大小限制:
举例:mac自带的apache
打开terminal

sudo vim /etc/php.ini
vim中 /upload_max_filesize回车,看看大小是多少M
再/post_max_size回车,看看大小是多少M

因为你的ipa大小2.9M,所以这两个值可以都设10M再试试看

【热门文章】
【热门文章】