简体   繁体   English

如何使用HTML将.ipa文件上传到服务器?

[英]How to upload .ipa file to server in html?

I am able to upload other file types like .txt, .png, .apk using 我可以使用上传其他文件类型,例如.txt,.png,.apk

<form action="index1.php" method="post" name = "mySuperForm"
enctype="multipart/form-data">


<input type="text" placeholder="Application Name" name="appname">
<input type="text" placeholder="Version Number" name="appversion">
Application File: <input style = "width:auto" type="file" name="file" id="file"><br>

</form>

But, when I try to upload a .ipa file, I can't grab the application name or version number on index1.php (the page I am posting to)using $_POST. 但是,当我尝试上传.ipa文件时,无法使用$ _POST在index1.php(我要发布到的页面)上获取应用程序名称或版本号。 However, if I upload a different file type, I can. 但是,如果上传其他文件类型,则可以。 It's as if nothing is getting posted if I try to upload an ipa file, like the html is failing on that line. 如果我尝试上传一个IPA文件,就好像什么都没有发布,就像html在该行上失败一样。 I am using my localhost, wamp server. 我正在使用本地主机wamp服务器。 Any advice? 有什么建议吗?

Without seeing your handling PHP, it's a bit difficult to diagnose, but here are a few potential items that may point you in the right direction: 如果看不到处理PHP的方法,这将很难诊断,但是这里有一些潜在的问题可能会为您指明正确的方向:

  • Does the .IPA file exceed the *post_max_size* or *upload_max_filesize* as defined in your PHP configuration? .IPA文件是否超过了PHP配置中定义的* post_max_size *或* upload_max_filesize *?
  • Try var_dump($_FILES); 尝试var_dump($_FILES); to see if your script is seeing the files there. 看看您的脚本是否正在那里查看文件。

I think this is happening because the file is too big and the request is being truncated by the web server, so PHP would not be able to access any form fields because the request was not completed. 我认为这是由于文件太大而请求被Web服务器截断而发生的,所以PHP将无法访问任何表单字段,因为请求未完成。 How large is the ipa file? ipa文件有多大? You might need to adjust your maximum post size. 您可能需要调整您的最大帖子大小。 The default is usually 4 MB. 默认值通常为4 MB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM